From 1abec709b0c8a2dfe0570ec98ca1310d6b2de585 Mon Sep 17 00:00:00 2001
From: Liam Stevens <8955671+liamstevens111@users.noreply.github.com>
Date: Wed, 8 Mar 2023 16:28:29 +0700
Subject: [PATCH 1/9] [#19] Add header element and pass user instead of context
for Outlet in router
---
src/components/Header/index.tsx | 16 ++++++++++++++++
src/components/PrivateRoute/index.tsx | 22 ++++++++++++----------
src/screens/Home/index.tsx | 6 ------
3 files changed, 28 insertions(+), 16 deletions(-)
create mode 100644 src/components/Header/index.tsx
diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx
new file mode 100644
index 0000000..ef1f11f
--- /dev/null
+++ b/src/components/Header/index.tsx
@@ -0,0 +1,16 @@
+import { User } from 'types/User';
+
+type HeaderProps = {
+ user: User;
+};
+
+function Header({ user }: HeaderProps) {
+ return (
+