From 6cf6c4b31026e02c1005e9054689c5de1e21b9ab Mon Sep 17 00:00:00 2001 From: heejin Date: Sat, 16 Nov 2024 18:37:33 +0900 Subject: [PATCH 01/11] =?UTF-8?q?=E2=9C=A8=20feat:=20add=20header=20and=20?= =?UTF-8?q?sidebar=20css=20and=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(with-header-sidebar)/layout.module.css | 14 ++++- src/app/(with-header-sidebar)/layout.tsx | 13 +++-- .../mydashboard/hooks/useApi.ts | 57 +++++++++++++++++++ .../mydashboard/hooks/useWindowSize.ts | 33 +++++++++++ .../mydashboard/types/dashboards.ts | 22 +++++++ .../mydashboard/types/user.ts | 8 +++ .../mydashboard/utils/axiosInstance.ts | 31 ++++++++++ src/app/reset.css | 1 + src/components/Button.tsx | 3 +- src/components/Header.module.css | 2 +- src/components/Header.tsx | 13 ++++- src/components/MainContainer.module.css | 0 src/components/MainContainer.tsx | 12 ++++ src/components/SideBar.module.css | 10 ++++ src/components/SideBar.tsx | 35 +++++++++++- src/constants/urls.ts | 2 +- 16 files changed, 241 insertions(+), 15 deletions(-) create mode 100644 src/app/(with-header-sidebar)/mydashboard/hooks/useApi.ts create mode 100644 src/app/(with-header-sidebar)/mydashboard/hooks/useWindowSize.ts create mode 100644 src/app/(with-header-sidebar)/mydashboard/types/dashboards.ts create mode 100644 src/app/(with-header-sidebar)/mydashboard/types/user.ts create mode 100644 src/app/(with-header-sidebar)/mydashboard/utils/axiosInstance.ts create mode 100644 src/components/MainContainer.module.css create mode 100644 src/components/MainContainer.tsx diff --git a/src/app/(with-header-sidebar)/layout.module.css b/src/app/(with-header-sidebar)/layout.module.css index 1dfd0fb..1737a4c 100644 --- a/src/app/(with-header-sidebar)/layout.module.css +++ b/src/app/(with-header-sidebar)/layout.module.css @@ -1,3 +1,13 @@ -.header { - color: yellowgreen; +.container { + display: flex; + height: 100%; +} + +.sideBarWrapper { + border-right: 1px solid var(--gray-300); + padding: 22px; +} + +.mainWrapper { + flex: 1; } diff --git a/src/app/(with-header-sidebar)/layout.tsx b/src/app/(with-header-sidebar)/layout.tsx index c085669..de9f3fb 100644 --- a/src/app/(with-header-sidebar)/layout.tsx +++ b/src/app/(with-header-sidebar)/layout.tsx @@ -1,16 +1,17 @@ import { ReactNode } from 'react'; import SideBar from '@/components/SideBar'; import styles from './layout.module.css'; -import Header from '@/components/Header'; +import MainContainer from '@/components/MainContainer'; export default function Layout({ children }: { children: ReactNode }) { return ( - <> -
-