forked from meong-story/meong-story-FE
-
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: 슬라이드 페이지 디자인 수정 [meong-story#94]
- Loading branch information
Showing
20 changed files
with
290 additions
and
169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useSuspenseQuery } from '@tanstack/react-query'; | ||
|
||
import { verificationKey } from '../../../shared/lib/query/queryKey'; | ||
import verificationAPI from './verificationAPI'; | ||
|
||
const useDetailVerification = ({ | ||
verificationId, | ||
}: { | ||
verificationId: string; | ||
}) => { | ||
return useSuspenseQuery({ | ||
queryKey: verificationKey.verification(verificationId), | ||
queryFn: () => verificationAPI.getDetailVerification(verificationId), | ||
}); | ||
}; | ||
export default useDetailVerification; |
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
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,40 @@ | ||
import { useNavigate } from 'react-router-dom'; | ||
import { Suspense } from 'react'; | ||
|
||
import { Layout } from '../../shared/ui'; | ||
import { LeftArrowIcon } from '../../shared/ui/Icons'; | ||
import ROUTE_PATH from '../../shared/constants/routePath'; | ||
import Spinner from '../../shared/ui/Spinner'; | ||
import { THEME } from '../../shared/styles/theme'; | ||
import DetailVerificationItem from '../../widgets/verification/ui/DetailVerificationItem'; | ||
import useDetailVerification from '../../entities/verification/api/useDetailVerification'; | ||
|
||
const DetailVerification = () => { | ||
const { data: detailVerification } = useDetailVerification({ | ||
verificationId: '1', | ||
}); | ||
return <DetailVerificationItem verification={detailVerification} as="div" />; | ||
}; | ||
|
||
const DetailVerificationPage = () => { | ||
const navigate = useNavigate(); | ||
return ( | ||
<Layout | ||
top={{ | ||
title: '상세 인증', | ||
leftButton: ( | ||
<LeftArrowIcon | ||
style={{ color: THEME.COLORS['P-BUTTON1'] }} | ||
onClick={() => navigate(ROUTE_PATH.SLIDE)} | ||
/> | ||
), | ||
}} | ||
> | ||
<Suspense fallback={<Spinner />}> | ||
<DetailVerification /> | ||
</Suspense> | ||
</Layout> | ||
); | ||
}; | ||
|
||
export default DetailVerificationPage; |
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
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,13 @@ | ||
const formattedDate = (dateString: string) => { | ||
const date = new Date(dateString); | ||
|
||
const options: Intl.DateTimeFormatOptions = { | ||
year: 'numeric', | ||
month: '2-digit', | ||
day: '2-digit', | ||
}; | ||
|
||
return date.toLocaleDateString('ko-KR', options).replace(/\. /g, '.'); | ||
}; | ||
|
||
export default formattedDate; |
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,33 @@ | ||
import styled from 'styled-components'; | ||
|
||
import Spinner from '../../../shared/ui/Spinner'; | ||
import useInfiniteVerificationsForSlide from '../../../entities/verification/api/useInfiniteVerificationsForSlide'; | ||
|
||
import DetailVerificationItem from '../../verification/ui/DetailVerificationItem'; | ||
|
||
const Feed = () => { | ||
const { data, targetItemRef, isFetchingNextPage } = | ||
useInfiniteVerificationsForSlide(); | ||
|
||
return ( | ||
<Container> | ||
{data.map((verification) => ( | ||
<DetailVerificationItem | ||
key={verification.id} | ||
verification={verification} | ||
/> | ||
))} | ||
<div ref={targetItemRef}></div> | ||
{isFetchingNextPage && <Spinner size={30} />} | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Feed; | ||
|
||
export const Container = styled.div` | ||
overflow-y: scroll; | ||
display: flex; | ||
flex-direction: column; | ||
background-color: #f9f5f5; | ||
`; |
Oops, something went wrong.