-
Notifications
You must be signed in to change notification settings - Fork 23
[강대원] sprint11 #140
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
Merged
pers0n4
merged 22 commits into
codeit-sprint-fullstack:next-강대원
from
Daewony:next-강대원-sprint11
Feb 27, 2025
The head ref may contain hidden characters: "next-\uAC15\uB300\uC6D0-sprint11"
Merged
[강대원] sprint11 #140
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
822c4f3
Merge pull request #2 from Daewony/next-강대원-sprint9
Daewony f1e43cc
Merge branch 'next-강대원-sprint9' of https://github.com/Daewony/3-sprin…
Daewony 3fc43fc
refactor: 폴더 구조 리팩토링 및 'auth', 'routes' 폴더 무시 설정
Daewony 7baa941
chore: next-sitemap 설치
Daewony 32dc6c6
feat: 판다마켓 랜딩 페이지 SEO 메타데이터 추가
Daewony 5f48c3f
refactor: 로그인 및 회원가입 페이지에서 Nav와 Footer 숨김 처리를 중첩 레이아웃으로 수정
Daewony f8687e5
refactor: 비밀번호 보이기 버튼 tab 포커스 제외 처리
Daewony 179eb0f
refactor: 베스트 상품 CSR -> SSR 적용
Daewony 4d839f9
fix: 타입 정의 파일명 수정
Daewony 0625a62
remove: 필요없는 주석 제거
Daewony eaffbd7
refactor: spint9 이미지 경로를 문자열 상수로 정의 적용
Daewony b5b9140
refactor: 전체 게시글 목록 wrappring 컴포넌트 추가
Daewony ae2b063
refactor(AllArticles): 쿼리 설정에 시간 단위 상수 적용
Daewony 785ef38
fix: productId 타입을 string | number -> string으로 통일
Daewony 9831f7e
refactor(CommentList): DropdownStates 타입 alias 도입
Daewony 9ffca33
refactor(commentApi): getComments 함수 수정
Daewony a5684ff
refactor(HomeBanner): dangerouslySetInnerHTML 불필요한 속성 제거
Daewony 788b38b
refactor(Pagination): 인라인 색상 코드 상수화 및 inline style 적용
Daewony 06b1c08
refactor: PostAndCommentActionsDropdown -> ActionsDropdown 컴포넌트 리팩토링,…
Daewony c0d74db
refactor: 'max-w-container' tailwind custom class 추가 및 적용
Daewony b74f618
refactor: 상수들을 utils 폴더에서 최상위 constants 디렉토리로 이동
Daewony 33421c8
refactor(CommentList): Record 타입 적용
Daewony 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| "use client"; | ||
|
|
||
| import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
| import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; | ||
|
|
||
| const queryClient = new QueryClient(); | ||
|
|
||
| export default function AuthLayout({ | ||
| children, | ||
| }: { | ||
| children: React.ReactNode; | ||
| }) { | ||
| return ( | ||
| <QueryClientProvider client={queryClient}> | ||
| <div className="flex min-h-screen flex-col pt-[75px]"> | ||
| <main className="flex-grow">{children}</main> | ||
| </div> | ||
| <ReactQueryDevtools initialIsOpen={false} /> | ||
| </QueryClientProvider> | ||
| ); | ||
| } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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 hidden or 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
File renamed without changes.
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import AllProducts from "@/components/items/AllProducts"; | ||
| import BestProducts from "@/components/items/BestProducts"; | ||
| import { BASE_URL } from "@/lib/axios"; | ||
|
|
||
| const ItemsPage = async () => { | ||
| // User Agent를 활용한 pageSize 결정은 app 디렉토리에서는 어렵기 때문에 기본값 사용 | ||
| const pageSize = 4; | ||
| let bestProducts = null; | ||
| try { | ||
| bestProducts = await getBestProducts(pageSize); | ||
| } catch (error) { | ||
| console.error("Error fetching best products:", error); | ||
| } | ||
|
|
||
| return ( | ||
| <article className="px-6 py-7"> | ||
| <section className="max-w-container mx-auto flex flex-col gap-10"> | ||
| <BestProducts items={bestProducts} /> | ||
| <AllProducts /> | ||
| </section> | ||
| </article> | ||
| ); | ||
| }; | ||
|
|
||
| // SSR을 사용하면 대신 fetch API를 직접 사용합니다. | ||
| async function getBestProducts(pageSize: number) { | ||
| console.log(BASE_URL); | ||
| const res = await fetch( | ||
| `${BASE_URL}/products?page=1&pageSize=${pageSize}&orderBy=favorite`, | ||
| { cache: "no-store" }, | ||
| ); | ||
| if (!res.ok) { | ||
| throw new Error("Failed to fetch"); | ||
| } | ||
| return res.json(); | ||
| } | ||
|
|
||
| export default ItemsPage; |
This file contains hidden or 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 hidden or 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
File renamed without changes.
This file contains hidden or 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
File renamed without changes.
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| "use client"; | ||
|
|
||
| import React from "react"; | ||
|
|
||
| type ArticleListWrapperProps = { | ||
| children: React.ReactNode; | ||
| }; | ||
|
|
||
| const ArticleListWrapper = ({ children }: ArticleListWrapperProps) => { | ||
| return <div className="article-list-wrapper">{children}</div>; | ||
| }; | ||
|
|
||
| export default ArticleListWrapper; |
This file contains hidden or 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
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.
상수 대신 함수를 만들어서 사용하는 방식도 괜찮을 것 같아요.