Skip to content

Commit

Permalink
metadata 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaeyeon1 committed Nov 29, 2023
1 parent 1683f42 commit 822cdde
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
11 changes: 11 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"next": "^14.0.3",
"next-remove-imports": "^1.0.12",
"notistack": "^3.0.1",
"picocolors": "^1.0.0",
"react": "18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "18.2.0",
Expand Down
25 changes: 8 additions & 17 deletions client/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
'use client';

import './globals.css';
import React, { ReactNode } from 'react';
// import Footer from '@/components/Footer';
import Recoil from '@/components/Recoil/Recoil';
import ThemeRegistry from '@/components/ReactQuery/ThemeRegistry';
import ReactQuery from '@/components/ReactQuery/Provider';
import Header from '@/components/Layout/Header';
import FullLayout from '@/components/Layout/FullLayout';
import { usePathname } from 'next/navigation';
import { SnackbarProvider } from 'notistack';
import { Metadata } from 'next';

export const metadata: Metadata = {
Expand All @@ -19,23 +14,19 @@ export const metadata: Metadata = {

export default function RootLayout(props: { children: ReactNode }) {
const { children } = props;
const pathname = usePathname();

return (
<html lang="en">
<body>
<Recoil>
<SnackbarProvider>
<ReactQuery>
<ThemeRegistry options={{ key: 'mui' }}>
{!pathname.startsWith('/login') && <Header />}
<div className="light">
<FullLayout>{children}</FullLayout>
</div>
{/* <Footer /> */}
</ThemeRegistry>
</ReactQuery>
</SnackbarProvider>
<ReactQuery>
<ThemeRegistry options={{ key: 'mui' }}>
<Header />
<div className="light">
<FullLayout>{children}</FullLayout>
</div>
</ThemeRegistry>
</ReactQuery>
</Recoil>
</body>
</html>
Expand Down
14 changes: 9 additions & 5 deletions client/src/components/Layout/FullLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
'use client';

import { Stack } from '@mui/material';
import { Theme, styled } from '@mui/material/styles';
import { usePathname } from 'next/navigation';
import FootPrintAnimation from '../FootPrint/FootPrintAnimation';
// import { useAndroidSSR, useIphoneSSR } from '../../../hooks/useRecoilSSR';
import { SnackbarProvider } from 'notistack';

type Children = {
children: React.ReactNode;
Expand All @@ -22,9 +24,11 @@ export default function FullLayout({ children }: Children) {
const pathname = usePathname();

return (
<MainStack pathname={pathname}>
{children}
<FootPrintAnimation />
</MainStack>
<SnackbarProvider>
<MainStack pathname={pathname}>
{children}
<FootPrintAnimation />
</MainStack>
</SnackbarProvider>
);
}

0 comments on commit 822cdde

Please sign in to comment.