-
Notifications
You must be signed in to change notification settings - Fork 3
✨ v1.2.0 - 상세페이지 북마크 #89
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
Changes from 6 commits
e2e97a6
04ec83a
bb81fcb
33be7a0
66ba170
e5baff4
76c3dd4
06fbcaa
d94bd2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ export interface PoseInfo { | |
tagAttributes: string; | ||
updatedAt: string; | ||
bookmarkCheck: boolean; | ||
width: number; | ||
height: number; | ||
width?: number; | ||
height?: number; | ||
Comment on lines
+12
to
+13
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. width와 height는 선택 조건으로 바뀐건가요 ? 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. 네! 백엔드에서 같은 포즈데이터에 대해 상세페이지에서는 width와 height를 보내주지 않고, 피드에서는 보내주는 형태라서 변경했습니다 :) 현재 백엔드에 요청드린 상태인데, 추후에 상세페이지에도 사이즈 정보를 같이 보내주게 바꿔주시면 그때 다시 바꿀 에정입니답 |
||
} | ||
|
||
// 포즈피드 | ||
|
@@ -60,17 +60,7 @@ export interface PosePickResponse { | |
} | ||
|
||
export interface PoseDetailResponse { | ||
poseInfo: { | ||
createdAt: string; | ||
frameCount: number; | ||
imageKey: string; | ||
peopleCount: number; | ||
poseId: number; | ||
source: string; | ||
sourceUrl: string; | ||
tagAttributes: string; | ||
updatedAt: string; | ||
}; | ||
poseInfo: PoseInfo; | ||
} | ||
|
||
export interface PoseTalkResponse { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ export function MainFooter({ children, grow = true }: MainFooterI) { | |
{isIOS() && <AppDownloadBanner />} | ||
</div> | ||
<div className="h-88" /> | ||
{isIOS() && <div className="h-62" />} | ||
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. iOS는 높이가 62px 더 필요한가요 ? 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. 네네 하단에 앱 다운로드 배너가 있어서 해당 배너만큼의 높이가 필요합니다! |
||
</> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,33 @@ | ||
import { QueryAsyncBoundary } from '@suspensive/react-query'; | ||
import { Metadata } from 'next'; | ||
// import { Metadata } from 'next'; | ||
|
||
import DetailSection from './DetailSection'; | ||
import { getPoseDetail } from '@/apis'; | ||
import { RejectedFallback } from '@/components/ErrorBoundary'; | ||
import Header from '@/components/Header'; | ||
import { Loading } from '@/components/Loading'; | ||
import { PageAnimation } from '@/components/PageAnimation'; | ||
import { HydrationProvider } from '@/components/Provider'; | ||
import { OPEN_GRAPH } from '@/constants'; | ||
// import { getPoseDetail } from '@/apis'; | ||
// import { OPEN_GRAPH } from '@/constants'; | ||
|
||
export async function generateMetadata({ params }: { params: { id: string } }): Promise<Metadata> { | ||
const id = parseInt(params.id); | ||
const { | ||
poseInfo: { peopleCount, frameCount, tagAttributes }, | ||
} = await getPoseDetail(id); | ||
const description = `${tagAttributes},${frameCount}컷,${peopleCount}인 포즈추천`; | ||
// 상세페이지 메타데이터 생성 | ||
// export async function generateMetadata({ params }: { params: { id: string } }): Promise<Metadata> { | ||
// const id = parseInt(params.id); | ||
// const { | ||
// poseInfo: { peopleCount, frameCount, tagAttributes }, | ||
// } = await getPoseDetail(id); | ||
// const description = `${tagAttributes},${frameCount}컷,${peopleCount}인 포즈추천`; | ||
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. 머지될 PR에는 주석이 없는 게 좋을 거 같아요. 나중에 제거될 코드인가요, 혹은 수정할 코드인가요 ? 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. 기존에 있던 코드인데 해당 기능이 완성되기 전까지는 작동하지 않는 부분이라 빌드할 때 경고가 떠서 주석처리하였습니다ㅠㅠ 메인에 머지할때는 지우겠습니답 |
||
|
||
return { | ||
description, | ||
openGraph: { | ||
title: OPEN_GRAPH.detail.title, | ||
description: OPEN_GRAPH.detail.description, | ||
images: [OPEN_GRAPH.detail.image], | ||
}, | ||
}; | ||
} | ||
// return { | ||
// description, | ||
// openGraph: { | ||
// title: OPEN_GRAPH.detail.title, | ||
// description: OPEN_GRAPH.detail.description, | ||
// images: [OPEN_GRAPH.detail.image], | ||
// }, | ||
// }; | ||
// } | ||
|
||
export default function DetailPage({ params }: { params: { id: number } }) { | ||
const { id } = params; | ||
|
||
return ( | ||
<div> | ||
{/* <Header close={true} menu={true} additional={<BookmarkButton style='black'/>} /> */} | ||
<Header close={true} menu={true} /> | ||
<QueryAsyncBoundary | ||
rejectedFallback={RejectedFallback} | ||
pendingFallback={<Loading className="h-[calc(100dvh-400px)]" />} | ||
> | ||
<PageAnimation> | ||
<HydrationProvider queryKey={['poseId', id]} queryFn={() => getPoseDetail(id)}> | ||
<DetailSection poseId={id} /> | ||
</HydrationProvider> | ||
</PageAnimation> | ||
</QueryAsyncBoundary> | ||
<DetailSection poseId={id} /> | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,12 @@ export const setClientCookie = (key: string, value: string, options?: { expires? | |
}; | ||
|
||
export const getClientCookie = (key: string) => { | ||
const value = `; ${document.cookie}`; | ||
const parts = value.split(`; ${key}=`); | ||
if (typeof window !== 'undefined') { | ||
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. 이미 만들어둔
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. 있는지 몰랐네요..! 반영하겠습니다아!! |
||
const value = `; ${document.cookie}`; | ||
const parts = value.split(`; ${key}=`); | ||
|
||
return parts.pop()?.split(';').shift(); | ||
return parts.pop()?.split(';').shift(); | ||
} | ||
}; | ||
|
||
export const removeClientCookie = (key: string) => { | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
{...options}
로 넘겨준 이유가 따로 있을까요 ?options로 넘겨줘도 괜찮을 거 같아서요 !
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.
헉 이전에 다른 속성을 함께 작성했다가 지웠는데 {}를 없애는걸 까먹고 있었네요 ...! 알려주셔서 감사합니다! 반영했습니다 :)