-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 기사 페이지 구성 #104 * feat: 기사 밑에 지도 추가 및 헤드라인 설정 #104 * feat: 말풍 추가 #104 * feat: 헤드라인 원복 #104 * feat: KakaoMap 수정 #104 * feat: latitude, longitude #104 * feat: viewcount 수정 #104 * feat: marker 클릭 가능한지 아닌지 구분 #104 * feat: 기사 클릭하면 이동하도록 설정 #104 * feat: 링크 범위 확장 #104 * feat: 멘트수정 #104 * feat: async 빼기 #104
- Loading branch information
Showing
9 changed files
with
181 additions
and
57 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
'use client'; | ||
|
||
import Image from 'next/image'; | ||
|
||
import { Box, Card, CardContent, Stack, Typography } from '@mui/material'; | ||
|
||
import CommentCard from '@/components/CommentCard'; | ||
import GradientBox from '@/components/GradientBox'; | ||
import Headline from '@/components/Headline'; | ||
import KakaoMap from '@/components/KakaoMap'; | ||
import color from '@/constants/color'; | ||
import hiddenGems from '@/mocks/villages'; | ||
|
||
const Page = ({ params }: { params: { id: number } }) => { | ||
const village = hiddenGems[params.id - 1]; | ||
|
||
return ( | ||
<GradientBox> | ||
<Stack alignItems="center" p={10}> | ||
<Box sx={{ maxWidth: '600px' }}> | ||
<Box sx={{ marginBottom: '2rem' }}> | ||
<Headline | ||
source="경단" | ||
title={village.title} | ||
uploadDate={village.publishedAt} | ||
viewCount={village.viewCount} | ||
/> | ||
</Box> | ||
<CommentCard isCharacter isStroke content={`오늘은 ${village.title}에 대해 소개해줄게😃`} /> | ||
<Box mt="2.5rem"> | ||
<Box> | ||
{village.imageUrl && ( | ||
<Image | ||
priority | ||
alt="articleImage" | ||
height={400} | ||
src={village.imageUrl} | ||
style={{ objectFit: 'contain' }} | ||
width={600} | ||
/> | ||
)} | ||
</Box> | ||
<Card sx={{ marginTop: '2rem', backgroundColor: 'transparent', boxShadow: 'none' }}> | ||
<CardContent sx={{ padding: 0 }}> | ||
<Typography fontSize="16px" py={2} variant="body2" whiteSpace="pre-line"> | ||
{village.content} | ||
</Typography> | ||
</CardContent> | ||
</Card> | ||
</Box> | ||
<Typography color={color.blue} fontSize="20px" py={2} variant="h3" /> | ||
<CommentCard isCharacter isChat content={`${village.title} 위치는 여기야`} /> | ||
<CommentCard isChat content="기억해뒀다가 다음에 가보자~~" /> | ||
</Box> | ||
<Box style={{ alignItems: 'center' }} width={600}> | ||
<KakaoMap | ||
initialLat={village.latitude} | ||
initialLon={village.longitude} | ||
isMarkerClicked={false} | ||
level={7} | ||
villages={[village]} | ||
/> | ||
</Box> | ||
</Stack> | ||
</GradientBox> | ||
); | ||
}; | ||
|
||
export default Page; |
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
Oops, something went wrong.