Skip to content

Commit

Permalink
온보딩 페이지 QA에 대응한다. (SWYP-team-2th#197)
Browse files Browse the repository at this point in the history
* 온보딩 QA

* pagenation dot color 변경

* Loading 동적 클래스 적용

* Loading 지역 상태 -> mutation isPending 값으로 변경
  • Loading branch information
YOOJS1205 committed Mar 4, 2025
1 parent bfbf657 commit 1340206
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
Binary file modified src/assets/images/onboarding/onboarding1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/onboarding/onboarding2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/onboarding/onboarding3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/common/Loading/Loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Loading({
)}
{...props}
>
<img src={Spinner} alt="loading" className="w-10 h-10" />
<img src={Spinner} alt="loading" className={cn('w-10 h-10', className)} />
</div>
);
}
4 changes: 4 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
display: none;
}

.swiper-pagination-bullet-active {
background-color: #000;
}

@theme {
--color-primary-900: #b36700;
--color-primary-800: #c97800;
Expand Down
14 changes: 12 additions & 2 deletions src/pages/Login/OAuthPage.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import usePostKakaoLogin from '@/api/usePostKaKaoLogin';
import Loading from '@/components/common/Loading';
import { setAccessToken, setRole } from '@/components/login/Auth/token';

export default function OAuthPage() {
const state = new URL(window.location.href).searchParams.get('state');
const navigate = useNavigate();
const { mutate } = usePostKakaoLogin({

const { mutate, isPending } = usePostKakaoLogin({
onSuccess: (data) => {
setRole(data.role);
setAccessToken(data.accessToken);
Expand All @@ -25,5 +27,13 @@ export default function OAuthPage() {
}
}, []);

return <div>로그인 진행중임다.</div>;
if (isPending) {
return (
<div className="flex items-center justify-center fixed inset-0">
<Loading className="w-30 h-30" />
</div>
);
}

return null;
}
6 changes: 3 additions & 3 deletions src/pages/OnBoarding/OnBoardingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export default function OnBoardingPage() {
{onBoardingSlides.map((slide) => (
<SwiperSlide key={slide.id}>
<div className="h-full flex flex-col items-center text-center">
<span className="text-h1 whitespace-pre-line mt-[80px] mb-[8px]">
<span className="text-h1 whitespace-pre-line mt-[120px] mb-[12px]">
{slide.title}
</span>

<span className="text-title-small whitespace-pre-line mb-[32px]">
<span className="text-title-small whitespace-pre-line mb-[18px]">
{slide.subtitle}
</span>
<img src={slide.image} className="w-[310px] mb-10" />
<img src={slide.image} />
</div>
</SwiperSlide>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/my/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function MyPage() {
}
/>
<div className="pt-[105px] px-6 w-full h-full flex flex-col gap-[30px] flex-1 min-h-0">
<Suspense fallback={<Loading className="h-[100px]" />}>
<Suspense fallback={<Loading />}>
<Profile />
</Suspense>
<Button
Expand Down

0 comments on commit 1340206

Please sign in to comment.