diff --git a/src/pages/feed/index.tsx b/src/pages/feed/index.tsx index f821d558..4e33ca65 100644 --- a/src/pages/feed/index.tsx +++ b/src/pages/feed/index.tsx @@ -97,7 +97,7 @@ export const getServerSideProps: GetServerSideProps<{ return { props: { - dehydratedState: dehydrate(queryClient), + dehydratedState: JSON.parse(JSON.stringify(dehydrate(queryClient))), }, }; }; diff --git a/src/pages/records/[id]/index.module.scss b/src/pages/records/[id]/index.module.scss index 15a7fe65..5ee79533 100644 --- a/src/pages/records/[id]/index.module.scss +++ b/src/pages/records/[id]/index.module.scss @@ -6,6 +6,18 @@ padding: 20px 30px calc(env(safe-area-inset-bottom) + 50px); } +.above-title { + display: flex; + flex-direction: row; + align-content: center; + justify-content: space-between; +} + +.report-button { + color: themes.$grey300; + @include themes.typography('caption12'); +} + .title-area { display: flex; flex-wrap: wrap; diff --git a/src/pages/records/[id]/index.tsx b/src/pages/records/[id]/index.tsx index bc75f028..6b49122a 100644 --- a/src/pages/records/[id]/index.tsx +++ b/src/pages/records/[id]/index.tsx @@ -14,6 +14,7 @@ import Chip from '@/shared/components/Chip'; import Icon from '@/shared/components/Icon'; import PageLayout from '@/shared/components/PageLayout'; import TopNavigator from '@/shared/components/TopNavigator'; +import useConfirm from '@/shared/hooks/useConfirm'; import { Alcohol } from '@/shared/types/alcohol'; import { Record } from '@/shared/types/record'; import { FlavorTag } from '@/shared/types/record/flavorTag'; @@ -28,6 +29,7 @@ type RecordDetailProps = { const RecordDetail = ({ id }: RecordDetailProps) => { const { data } = useGetRecord({ variables: { recordId: id } }); + const { confirm } = useConfirm(); const formatRecordTags = useCallback( ([alcoholPercent, alcoholPercentFeeling, flavorDetailTag]: [ @@ -46,6 +48,17 @@ const RecordDetail = ({ id }: RecordDetailProps) => { [] ); + const handleClickReport = async () => { + if ( + await confirm({ + message: '정말 신고하시겠어요?', + okText: '확인', + }) + ) { + window.location.href = 'mailto:gino9940@gmail.com'; + } + }; + if (!data) { return null; } @@ -57,13 +70,21 @@ const RecordDetail = ({ id }: RecordDetailProps) => { ({ url }))} /> - {/* TODO : 주종 api 연동 */} - + + + + 신고하기 + + {alcoholInfo.alcoholName}