Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#445] Layout 컴포넌트에서 TopHeader 컴포넌트 분리 #452

Merged
merged 2 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/bookarchive/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import TopHeader from '@/ui/Base/TopHeader';
export default function BookArchivePage() {
return (
<div className="flex w-full flex-col gap-[1rem]">
<TopHeader pathname="/bookarchive"></TopHeader>
<TopHeader pathname="/bookarchive" />
{/* TODO: 스켈레톤 컴포넌트로 교체 */}
<Suspense fallback={null}>
<Contents />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContextProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use client';

import { RecoilRoot } from 'recoil';
import Layout from '@/ui/common/Layout';
import { ErrorBoundary } from 'react-error-boundary';
import ChakraThemeProvider from '@/components/ChakraThemeProvider';
import ReactQueryProvider from '@/components/ReactQueryProvider';
import { ReactNode } from 'react';
import ErrorPage from '@/app/error';
import ToastProvider from '@/ui/Base/Toast/ToastProvider';
import Layout from '@/v1/layout/Layout';

const ContextProvider = ({ children }: { children: ReactNode }) => {
return (
Expand Down
44 changes: 0 additions & 44 deletions src/ui/common/Layout/index.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/v1/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import { usePathname } from 'next/navigation';

import TopHeader from '@/ui/Base/TopHeader';
import BottomNavigation from '@/ui/Base/BottomNavigation';

/**
* @todo
* 토스트 추가
* 크로스 브라우징 - dvh & vh에 대해 고민
*/

Expand All @@ -28,7 +26,6 @@ const Layout = ({ children }: LayoutProps) => {
<div
className={`h-screen w-full max-w-[43rem] animate-page-transition overflow-auto px-[2rem] ${dynamicClass}`}
>
{isRootPath && <TopHeader pathname={pathname} />}
{children}
</div>
{isRootPath && <BottomNavigation pathname={pathname} />}
Expand Down