From 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 29 Apr 2022 12:13:34 +0200
Subject: chore: remove old pages, components, helpers and types

Since I'm using new components, I will also rewrite the GraphQL queries
so it is easier to start from scratch.
---
 src/components/Sidebar/Sidebar.tsx | 40 --------------------------------------
 1 file changed, 40 deletions(-)
 delete mode 100644 src/components/Sidebar/Sidebar.tsx

(limited to 'src/components/Sidebar/Sidebar.tsx')

diff --git a/src/components/Sidebar/Sidebar.tsx b/src/components/Sidebar/Sidebar.tsx
deleted file mode 100644
index 9e2079d..0000000
--- a/src/components/Sidebar/Sidebar.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Children, cloneElement, isValidElement, ReactNode } from 'react';
-import styles from './Sidebar.module.scss';
-
-type SidebarPosition = 'left' | 'right';
-
-const Sidebar = ({
-  children,
-  position,
-  ariaLabel,
-  title,
-}: {
-  children: ReactNode;
-  position: SidebarPosition;
-  ariaLabel?: string;
-  title?: string;
-}) => {
-  const childrenWithProps = Children.map(children, (child) => {
-    if (isValidElement(child)) {
-      return cloneElement(child, { titleLevel: title ? 3 : 2 });
-    }
-    return child;
-  });
-
-  const positionClass = `wrapper--${position}`;
-
-  return (
-    <aside
-      className={`${styles.wrapper} ${styles[positionClass]}`}
-      aria-label={ariaLabel}
-      aria-labelledby={title ? `${position}-sidebar-title` : undefined}
-    >
-      <div className={styles.body}>
-        {title && <h2 id={`${position}-sidebar-title`}>{title}</h2>}
-        {childrenWithProps}
-      </div>
-    </aside>
-  );
-};
-
-export default Sidebar;
-- 
cgit v1.2.3

