diff --git a/components/Footer.tsx b/components/Footer.tsx index c26ae3f..8c3520c 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,24 +1,37 @@ import { observer } from 'mobx-react'; -import { useContext } from 'react'; +import Link from 'next/link'; +import { FC, useContext } from 'react'; import { Col, Container, Nav, Row } from 'react-bootstrap'; import { ContactEmail, GitHubURL, WeChatURL } from '../models/configuration'; import { I18nContext } from '../models/Translation'; -export const Footer = observer(() => { +export type FooterLink = Record<'href' | 'icon' | 'label', string>; + +export interface FooterProps { + description: string; + quickLinks: FooterLink[]; +} + +const CopyrightStartYear = 2021; + +export const Footer: FC = observer(({ description, quickLinks }) => { const { t } = useContext(I18nContext); + const currentYear = new Date().getFullYear(); + const copyrightYear = + CopyrightStartYear === currentYear ? currentYear : `${CopyrightStartYear}-${currentYear}`; return ( -