Skip to content

Commit

Permalink
feat: add terms, privacy and bounty links (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaroz authored Oct 17, 2024
1 parent 1f1be7f commit 78a82b3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
39 changes: 17 additions & 22 deletions src/components/nav/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Link from 'next/link';
import { ReactNode } from 'react';

import { links } from '../../consts/links';
import { Color } from '../../styles/Color';
Expand All @@ -7,15 +8,22 @@ import { Github } from '../icons/Github';
import { HyperlaneLogo } from '../icons/HyperlaneLogo';
import { Twitter } from '../icons/Twitter';

const footerLinks1 = [
{ title: 'Docs', url: links.docs, external: true },
{ title: 'Homepage', url: links.home, external: true },
{ title: 'Explorer', url: links.explorer, external: true },
];
type FooterLink = {
title: string;
url: string;
external: boolean;
icon?: ReactNode;
};

const footerLinks3 = [
const footerLinks: FooterLink[] = [
{ title: 'Docs', url: links.docs, external: true },
{ title: 'Terms', url: links.tos, external: true },
{ title: 'Twitter', url: links.twitter, external: true, icon: <Twitter fill="#fff" /> },
{ title: 'Homepage', url: links.home, external: true },
{ title: 'Privacy', url: links.privacyPolicy, external: true },
{ title: 'Discord', url: links.discord, external: true, icon: <Discord fill="#fff" /> },
{ title: 'Explorer', url: links.explorer, external: true },
{ title: 'Bounty', url: links.bounty, external: true },
{ title: 'Github', url: links.github, external: true, icon: <Github fill="#fff" /> },
];

Expand Down Expand Up @@ -49,21 +57,8 @@ function FooterLogo() {
function FooterNav() {
return (
<nav className="flex text-md font-medium">
<ul className={`${styles.linkCol} mr-14`}>
{footerLinks1.map((item) => (
<li className="" key={item.title}>
<Link
className={styles.linkItem}
target={item.external ? '_blank' : '_self'}
href={item.url}
>
<div className="">{item.title}</div>
</Link>
</li>
))}
</ul>
<ul className={`${styles.linkCol}`}>
{footerLinks3.map((item) => (
<ul className={`${styles.linkGrid}`}>
{footerLinks.map((item) => (
<li key={item.title}>
<Link
className={styles.linkItem}
Expand All @@ -81,6 +76,6 @@ function FooterNav() {
}

const styles = {
linkCol: 'flex flex-col gap-1.5',
linkGrid: 'grid grid-cols-3 gap-x-6 gap-y-1.5',
linkItem: 'flex items-center capitalize text-decoration-none hover:underline underline-offset-2',
};
4 changes: 4 additions & 0 deletions src/consts/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ export const links = {
chains: 'https://docs.hyperlane.xyz/docs/resources/domains',
twitter: 'https://twitter.com/hyperlane',
blog: 'https://medium.com/hyperlane',
tos: 'https://hyperlane.xyz/terms-of-service',
privacyPolicy: 'https://hyperlane.xyz/privacy-policy',
bounty:
'https://github.com/search?q=org:hyperlane-xyz+label:bounty+is:open+is:issue&type=issues&s=&o=desc',
};

0 comments on commit 78a82b3

Please sign in to comment.