-
Notifications
You must be signed in to change notification settings - Fork 79
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
[김지윤] Sprint11 #688
Merged
lisarnjs
merged 17 commits into
codeit-bootcamp-frontend:Next.js-김지윤
from
wayandway:Next.js-김지윤-sprint11
Jun 17, 2024
The head ref may contain hidden characters: "Next.js-\uAE40\uC9C0\uC724-sprint11"
Merged
[김지윤] Sprint11 #688
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
91b3af9
Fix: 배열 렌더링 키값 설정
wayandway 0ea15a1
Chore: classnames 설치
wayandway a434f0a
Fix: classnames 적용 테스트 / 조건부로 클래스 추가
wayandway 619bc1d
Refactor: 검색창 디바운싱 로직을 커스텀훅으로 분리
wayandway e52d5e4
Chore: react-hook-from 설치
wayandway 5a4ff75
Chore: react toastify 설치
wayandway 1f7b3f4
Feat: width, height, borderRadius, fontSize, disabled 커스텀 기능 추가
wayandway edbbb25
Fix: auth/ 이하 경로에서는 헤더가 안보이도록 수정
wayandway 1e0127e
Fix: auth/ 이하 경로에선 헤더가 안보이도록 수정
wayandway d85404a
Feat: 토스트 메시지 컨테이너 추가
wayandway 1d06136
Feat: 토큰 처리 로직 추가
wayandway 936f5c9
Feat: User 인터페이스 정의 추가
wayandway 70a457b
Feat: 로그인 폼 추가
wayandway d8ca1ad
Feat: 회원가입 폼 추가
wayandway dbd5fa6
Feat: 로그인/회원가입 폼 공통 스타일 시트 추가
wayandway d0ffd27
Feat: AuthProvider 추가
wayandway d65255e
Feat: 이미 로그인 돼있는 경우 /auth 페이지로 접근 안되도록 로직 추가
wayandway File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
import { useRouter } from "next/router"; | ||
import classNames from "classnames"; | ||
import styles from "./Layout.module.scss"; | ||
|
||
export default function Layout({ className = "", page = true, ...props }) { | ||
const classNames = `${styles.container} ${ | ||
page ? styles.page : "" | ||
} ${className}`; | ||
return <div className={classNames} {...props} />; | ||
} | ||
const Layout = ({ | ||
className = "", | ||
...props | ||
}: { | ||
className?: string; | ||
children: React.ReactNode; | ||
}) => { | ||
const router = useRouter(); | ||
const isAuthPage = router.pathname.startsWith("/auth"); | ||
const pageClassName = classNames(styles.container, { | ||
[styles.authPage]: isAuthPage, | ||
[styles.page]: !isAuthPage, | ||
[className]: className, | ||
}); | ||
|
||
return <div className={pageClassName} {...props} />; | ||
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. classNames로 불러오기 너무 길어서 저는 이런식으로 사용합니다! import classnames from 'classnames/bind'
const cx = classnames.bind(styles)
<div className={cx(stylescontianer, {['authPage']: isAuthPage })}></div> |
||
}; | ||
|
||
export default Layout; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
오 mixin 으로 font-style을 만들어주셨군요!! 👍