diff --git a/quartz/components/CustomFooter.tsx b/quartz/components/CustomFooter.tsx index 96734bb..7e331f2 100644 --- a/quartz/components/CustomFooter.tsx +++ b/quartz/components/CustomFooter.tsx @@ -1,7 +1,6 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" import style from "./styles/footer.scss" -import { version } from "../../package.json" -import { i18n } from "../i18n" +import FooterLinksConstructor from "./Footer_links" interface Options { links: Record @@ -9,17 +8,16 @@ interface Options { } export default ((opts?: Options) => { - const Footer: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { - const year = new Date().getFullYear() - const links = opts?.links ?? [] - const rings = opts?.rings ?? [] + const FooterLinks = FooterLinksConstructor(opts) + + const CustomFooter: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { return ( ) } - Footer.css = style - return Footer + CustomFooter.css = style + return CustomFooter }) satisfies QuartzComponentConstructor diff --git a/quartz/components/Footer_links.tsx b/quartz/components/Footer_links.tsx index 66fa562..e486d53 100644 --- a/quartz/components/Footer_links.tsx +++ b/quartz/components/Footer_links.tsx @@ -9,11 +9,12 @@ interface Options { } export default ((opts?: Options) => { - const Footer: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { + const FooterLinks: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { const year = new Date().getFullYear() const links = opts?.links ?? [] const rings = opts?.rings ?? [] return ( +

))} + ) } - Footer.css = style - return Footer + FooterLinks.css = style + return FooterLinks }) satisfies QuartzComponentConstructor