Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 포즈톡 페이지 > 뽑기 누르면 이미지 내려가는 이슈 #65

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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