-
Notifications
You must be signed in to change notification settings - Fork 6
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
Design: 글로벌 스타일 수정에 따른 전체 페이지 스타일 조정 #278
Changes from all commits
9aa982e
2759bd7
5cccb5b
92e507f
a1ecd58
68929c7
17a364f
ab7cb5e
4ef4443
76a3a10
0c3ca4a
26c428a
fb33d4e
2f8fc23
b786f72
e2d0ed7
276630c
eedd7f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { ReactNode } from 'react'; | ||
import type { Metadata, Viewport } from 'next'; | ||
import { headers } from 'next/headers'; | ||
import { ReferrerEnum } from 'next/dist/lib/metadata/types/metadata-types'; | ||
import { OpenGraphType } from 'next/dist/lib/metadata/types/opengraph-types'; | ||
import { ToastContainer } from 'react-toastify'; | ||
|
@@ -44,6 +45,9 @@ export const metadata: Metadata = { | |
}; | ||
|
||
export default function Layout({ children }: { children: ReactNode }) { | ||
const pathname = headers().get('pathname') || ''; | ||
const isAdminStyle = pathname.startsWith('/admin'); | ||
|
||
return ( | ||
<html lang="ko"> | ||
<head> | ||
|
@@ -53,7 +57,7 @@ export default function Layout({ children }: { children: ReactNode }) { | |
<link rel="apple-touch-icon" href="https://image.listywave.com/favicon/favicon.png" /> | ||
<meta name="theme-color" content="#ffffff" /> | ||
</head> | ||
<body className={styles.body}> | ||
<body className={isAdminStyle ? styles.adminBodyStyle : styles.basicBodyStyle}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (1) middleware.ts 파일에서 pathname을 리스폰스 headers에 담아서 내려주고, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 소현님 의견 받아주시고 서버컴포넌트 활용할 수 있는 방안으로 찾아 너무 좋은 방향 잡아주셔서 정말 감사합니다!! LGTM🫧🩵 |
||
<CommonProvider> | ||
<div id="modal-root" /> | ||
<div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nahyun-Kang 나현님, 트랜딩 리스트 API 변경이 필요한 것 같아서 변경 전 콘솔창 에러를 방지하기 위해 해당 API 호출 부분은 주석처리 해두었습니다!