Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge main into ezeth #281

Draft
wants to merge 2 commits into
base: ezeth
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 17 additions & 22 deletions src/components/nav/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
import Image from 'next/image';
import Link from 'next/link';
import { ReactNode } from 'react';

import { links } from '../../consts/links';
import { Discord } from '../icons/Discord';
import { Github } from '../icons/Github';
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 @@ -46,21 +54,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 @@ -78,6 +73,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',
};