From 95c987726386c9dfa4dc406e3cb8f96e763fcb40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Wed, 31 Jan 2024 16:50:02 +0100 Subject: [PATCH 1/2] refactor: add types directory --- src/types/user.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/types/user.ts diff --git a/src/types/user.ts b/src/types/user.ts new file mode 100644 index 0000000..9d4d670 --- /dev/null +++ b/src/types/user.ts @@ -0,0 +1,6 @@ +export type TUser = { + id: string; + email: string; + name: string; + image: string; +}; From 082974ba83b9984a3a6f6073be15f868bb6dc016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Wed, 31 Jan 2024 17:08:53 +0100 Subject: [PATCH 2/2] refactor: improve components directory structure --- src/app/layout.tsx | 4 ++-- src/components/{header.tsx => navbar/navbar.tsx} | 8 ++++---- src/components/{ => navbar}/sign-in-button.tsx | 0 src/components/{ => navbar}/theme-toggle.tsx | 0 src/components/{ => navbar}/user-dropdown.tsx | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) rename src/components/{header.tsx => navbar/navbar.tsx} (73%) rename src/components/{ => navbar}/sign-in-button.tsx (100%) rename src/components/{ => navbar}/theme-toggle.tsx (100%) rename src/components/{ => navbar}/user-dropdown.tsx (94%) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 328e00e..a861806 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,7 +4,7 @@ import { PropsWithChildren } from 'react'; import type { Metadata } from 'next'; import { Footer } from '@/components/footer'; -import { Header } from '@/components/header'; +import { Navbar } from '@/components/navbar/navbar'; import { ThemeProvider } from '@/components/theme-provider'; import { siteConfig } from '@/lib/constant'; import { fonts } from '@/lib/fonts'; @@ -49,7 +49,7 @@ const RootLayout = ({ children }: PropsWithChildren) => { -
+ {children}