Skip to content

Commit

Permalink
Merge pull request #65 from dnd-side-project/feature/64-issue
Browse files Browse the repository at this point in the history
[Fix] 포즈톡 페이지 > 뽑기 누르면 이미지 내려가는 이슈
  • Loading branch information
seondal committed Sep 27, 2023
2 parents 63931c7 + 9bcd5d5 commit 0fa4ebd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 29 deletions.
40 changes: 12 additions & 28 deletions src/app/(Main)/talk/components/TalkSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import useLoading from '@/hooks/useLoading';
export default function TalkSection() {
const [talkWord, setTalkWord] = useState<string>(`제시어에 맞춰 포즈를 취해요!`);
const { isLoading: isFirstLoading, stopLoading: stopFirstLoading } = useLoading({
loadingDelay: 1000,
isFirstLoadingInfinite: true,
});
const { refetch, data } = usePoseTalkQuery({

const { refetch } = usePoseTalkQuery({
onSuccess: (data) => {
setTimeout(() => {
setTalkWord(data.poseWord.content);
Expand Down Expand Up @@ -46,35 +46,19 @@ export default function TalkSection() {

return (
<section className="flex flex-col items-center">
<h1 className="max-w-310 break-keep text-center">{talkWord}</h1>
<h1 className="h-100 max-w-310 items-center break-keep text-center">{talkWord}</h1>

<Spacing size={10} />

{isFirstLoading && (
<Lottie
loop
animationData={lottieTalkBeforeClick}
play
style={{ width: '100%', height: '100%' }}
/>
)}
{isLoading && !isFirstLoading && (
<Lottie
loop
animationData={lottieTalkAfterClick}
play
style={{ width: '120%', height: '100%' }}
/>
)}
{!isFirstLoading && !isLoading && (
<Lottie
loop
animationData={lottieTalkAfterClick}
play
style={{ width: '120%', height: '100%' }}
speed={0}
/>
)}
<div className="flex h-300 justify-center">
{isFirstLoading && <Lottie loop animationData={lottieTalkBeforeClick} play />}
{!isFirstLoading && isLoading && (
<Lottie loop animationData={lottieTalkAfterClick} play speed={1.2} className="w-500" />
)}
{!isFirstLoading && !isLoading && (
<Lottie loop animationData={lottieTalkAfterClick} play speed={0} className="w-500" />
)}
</div>

<BottomFixedButton
className="bg-main-violet text-white"
Expand Down
2 changes: 1 addition & 1 deletion src/app/(Sub)/detail/[id]/components/DetailHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function DetailHeader() {
else router.replace('/feed');
}}
>
<Image src="/icons/close.svg" width={24} height={24} alt="back" />
<Image src="/sprite/icons/close.svg" width={24} height={24} alt="back" />
</IconButton>
}
rightNode={
Expand Down

0 comments on commit 0fa4ebd

Please sign in to comment.