-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sprint/refactor-the-project' into feat/ci
- Loading branch information
Showing
64 changed files
with
350 additions
and
400 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
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,23 @@ | ||
'use client'; | ||
|
||
import { QueryAsyncBoundary } from '@suspensive/react-query'; | ||
|
||
import FeedContent from './FeedContent'; | ||
import FilterSheet from './FilterSheet'; | ||
import { RejectedFallback } from '@/components/ErrorBoundary'; | ||
import { Loading } from '@/components/Loading'; | ||
import { PageAnimation } from '@/components/PageAnimation'; | ||
|
||
export default function FeedComponent() { | ||
return ( | ||
<QueryAsyncBoundary | ||
rejectedFallback={RejectedFallback} | ||
pendingFallback={<Loading className="h-[calc(100dvh-178px)]" />} | ||
> | ||
<PageAnimation> | ||
<FeedContent /> | ||
<FilterSheet /> | ||
</PageAnimation> | ||
</QueryAsyncBoundary> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,23 +1,5 @@ | ||
'use client'; | ||
|
||
import { QueryAsyncBoundary } from '@suspensive/react-query'; | ||
|
||
import FeedContent from './FeedContent'; | ||
import FilterSheet from './FilterSheet'; | ||
import { RejectedFallback } from '@/components/ErrorBoundary'; | ||
import { Loading } from '@/components/Loading'; | ||
import { PageAnimation } from '@/components/PageAnimation'; | ||
import FeedComponent from './FeedComponent'; | ||
|
||
export default function Feed() { | ||
return ( | ||
<QueryAsyncBoundary | ||
rejectedFallback={RejectedFallback} | ||
pendingFallback={<Loading className="h-[calc(100dvh-178px)]" />} | ||
> | ||
<PageAnimation> | ||
<FeedContent /> | ||
<FilterSheet /> | ||
</PageAnimation> | ||
</QueryAsyncBoundary> | ||
); | ||
return <FeedComponent />; | ||
} |
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,23 @@ | ||
'use client'; | ||
|
||
import { PrimaryButton } from '@/components/Button'; | ||
import EmptyCase from '@/components/Feed/EmptyCase'; | ||
import { PreparingPopup } from '@/components/Modal'; | ||
import { useOverlay } from '@/components/Overlay/useOverlay'; | ||
|
||
export default function MyPoseComponent() { | ||
const { open } = useOverlay(); | ||
|
||
return ( | ||
<EmptyCase | ||
title={'나만의 포즈를 추가해 보세요!'} | ||
text={'포즈피드에 네컷사진을 업로드할 수 있어요'} | ||
> | ||
<PrimaryButton | ||
onClick={() => open(({ exit }) => <PreparingPopup onClose={exit} />)} | ||
text="포즈 등록하기" | ||
variant="secondary" | ||
/> | ||
</EmptyCase> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,23 +1,7 @@ | ||
'use client'; | ||
|
||
import { PrimaryButton } from '@/components/Button'; | ||
import EmptyCase from '@/components/Feed/EmptyCase'; | ||
import { PreparingPopup } from '@/components/Modal'; | ||
import { useOverlay } from '@/components/Overlay/useOverlay'; | ||
import MyPoseComponent from './MyPoseComponent'; | ||
|
||
export default function Page() { | ||
const { open } = useOverlay(); | ||
|
||
return ( | ||
<EmptyCase | ||
title={'나만의 포즈를 추가해 보세요!'} | ||
text={'포즈피드에 네컷사진을 업로드할 수 있어요'} | ||
> | ||
<PrimaryButton | ||
onClick={() => open(({ exit }) => <PreparingPopup onClose={exit} />)} | ||
text="포즈 등록하기" | ||
type="secondary" | ||
/> | ||
</EmptyCase> | ||
); | ||
return <MyPoseComponent />; | ||
} |
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,62 @@ | ||
'use client'; | ||
|
||
import { delay } from 'es-toolkit'; | ||
import { useState } from 'react'; | ||
import Lottie from 'react-lottie-player'; | ||
|
||
import lottiePick from '#/lotties/pick.json'; | ||
import { usePosePickQuery } from '@/apis'; | ||
import { BottomFixedDiv, PrimaryButton } from '@/components/Button'; | ||
import PoseImage from '@/components/Modal/PoseImage'; | ||
import { SelectionBasic } from '@/components/Selection'; | ||
import { peopleCountList } from '@/constants'; | ||
import { useDidMount } from '@/hooks'; | ||
|
||
const DEFAULT_IMAGE = '/images/image-frame.png'; | ||
|
||
export default function PickComponent() { | ||
const [countState, setCountState] = useState(1); | ||
const [isLottiePlaying, setIsLottiePlaying] = useState(true); | ||
const { refetch, data } = usePosePickQuery(countState); | ||
const imageSrc = data?.poseInfo?.imageKey || DEFAULT_IMAGE; | ||
|
||
useDidMount(async () => { | ||
await delay(2200); | ||
setIsLottiePlaying(false); | ||
}); | ||
|
||
const handlePickClick = async () => { | ||
refetch(); | ||
setIsLottiePlaying(true); | ||
await delay(900); | ||
setIsLottiePlaying(false); | ||
}; | ||
|
||
return ( | ||
<> | ||
<div className="py-16"> | ||
<SelectionBasic | ||
data={peopleCountList.slice(1)} | ||
state={countState} | ||
setState={setCountState} | ||
/> | ||
</div> | ||
<div className="relative flex grow"> | ||
{isLottiePlaying && ( | ||
<div className="absolute inset-x-0 inset-y-0 z-10 flex justify-center bg-black"> | ||
<Lottie animationData={lottiePick} play /> | ||
</div> | ||
)} | ||
<div className="absolute inset-x-0 inset-y-0 bg-black"> | ||
<PoseImage src={imageSrc} /> | ||
</div> | ||
</div> | ||
<BottomFixedDiv> | ||
<PrimaryButton | ||
text={!!imageSrc ? `${countState}인 포즈 뽑기` : '인원수 선택하고 포즈 뽑기'} | ||
onClick={handlePickClick} | ||
/> | ||
</BottomFixedDiv> | ||
</> | ||
); | ||
} |
Oops, something went wrong.