From 9aeb82269d7c74c4566b7ca254782a4dfbd69a6e Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 25 Oct 2023 18:33:22 +0200
Subject: refactor(components): remove SiteHeader and SiteFooter components

They do not help to make the layout more readable (on the contrary I
think...) so the props drilling is useless.
---
 src/components/organisms/layout/site-footer.tsx | 78 -------------------------
 1 file changed, 78 deletions(-)
 delete mode 100644 src/components/organisms/layout/site-footer.tsx

(limited to 'src/components/organisms/layout/site-footer.tsx')

diff --git a/src/components/organisms/layout/site-footer.tsx b/src/components/organisms/layout/site-footer.tsx
deleted file mode 100644
index ccab051..0000000
--- a/src/components/organisms/layout/site-footer.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import type { FC, ReactNode } from 'react';
-import { useIntl } from 'react-intl';
-import { Footer } from '../../atoms';
-import {
-  BackToTop,
-  type BackToTopProps,
-  Colophon,
-  type ColophonLink,
-  type CopyrightProps,
-  Copyright,
-} from '../../molecules';
-import styles from './site-footer.module.scss';
-
-export type SiteFooterProps = {
-  /**
-   * Set additional classnames to the back to top button.
-   */
-  backToTopClassName?: BackToTopProps['className'];
-  /**
-   * Set additional classnames to the footer element.
-   */
-  className?: string;
-  /**
-   * Set the copyright information.
-   */
-  copyright: CopyrightProps;
-  /**
-   * The website license.
-   */
-  license?: ReactNode;
-  /**
-   * The footer nav items.
-   */
-  navItems?: ColophonLink[];
-  /**
-   * An element id (without hashtag) used as anchor for back to top button.
-   */
-  topId: string;
-};
-
-/**
- * SiteFooter component
- *
- * Renders a footer with copyright and nav;
- */
-export const SiteFooter: FC<SiteFooterProps> = ({
-  backToTopClassName,
-  className = '',
-  copyright,
-  license,
-  navItems,
-  topId,
-}) => {
-  const intl = useIntl();
-  const backToTop = intl.formatMessage({
-    defaultMessage: 'Back to top',
-    description: 'SiteFooter: an accessible name for the back to top button',
-    id: 'OHvb01',
-  });
-  const backToTopAnchor = `#${topId}`;
-  const footerClass = `${styles.wrapper} ${className}`;
-  const btnClass = `${styles['back-to-top']} ${backToTopClassName}`;
-
-  return (
-    <Footer className={footerClass}>
-      <Colophon
-        copyright={<Copyright {...copyright} />}
-        license={license}
-        links={navItems}
-      />
-      <BackToTop
-        anchor={backToTopAnchor}
-        className={btnClass}
-        label={backToTop}
-      />
-    </Footer>
-  );
-};
-- 
cgit v1.2.3

