Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinho1011 committed Oct 13, 2023
2 parents 41c63e9 + 4f56e2f commit 77a82a9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/pages/feed/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const getServerSideProps: GetServerSideProps<{

return {
props: {
dehydratedState: dehydrate(queryClient),
dehydratedState: JSON.parse(JSON.stringify(dehydrate(queryClient))),
},
};
};
12 changes: 12 additions & 0 deletions src/pages/records/[id]/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
35 changes: 28 additions & 7 deletions src/pages/records/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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]: [
Expand All @@ -46,6 +48,17 @@ const RecordDetail = ({ id }: RecordDetailProps) => {
[]
);

const handleClickReport = async () => {
if (
await confirm({
message: '정말 신고하시겠어요?',
okText: '확인',
})
) {
window.location.href = 'mailto:[email protected]';
}
};

if (!data) {
return null;
}
Expand All @@ -57,13 +70,21 @@ const RecordDetail = ({ id }: RecordDetailProps) => {
<TopNavigator title="내 게시글" />
<ImageSwiper images={record.photoPathList.map((url) => ({ url }))} />
<div className={cx('contents-wrap')}>
{/* TODO : 주종 api 연동 */}
<Chip
label="과실주"
type="Primary"
appearance="round"
size="mediumLarge"
/>
<div className={cx('above-title')}>
<Chip
label="과실주"
type="Primary"
appearance="round"
size="mediumLarge"
/>
<button
onClick={handleClickReport}
className={cx('report-button')}
type="button"
>
신고하기
</button>
</div>
<div className={cx('title-area')}>
<h1 className={cx('title')}>{alcoholInfo.alcoholName}</h1>
<span className={cx('location')}>
Expand Down

0 comments on commit 77a82a9

Please sign in to comment.