Skip to content
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
Binary file added public/assets/rending/new-swipe/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
174 changes: 0 additions & 174 deletions public/assets/rending/new-swipe/1.svg

This file was deleted.

Binary file added public/assets/rending/new-swipe/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
143 changes: 0 additions & 143 deletions public/assets/rending/new-swipe/2.svg

This file was deleted.

Binary file added public/assets/rending/new-swipe/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
387 changes: 0 additions & 387 deletions public/assets/rending/new-swipe/3.svg

This file was deleted.

Binary file added public/assets/rending/new-swipe/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
387 changes: 0 additions & 387 deletions public/assets/rending/new-swipe/4.svg

This file was deleted.

1 change: 1 addition & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const viewport = {
initialScale: 1,
maximumScale: 1,
userScalable: false,
viewportFit: 'cover',
};

export default function RootLayout({
Expand Down
10 changes: 5 additions & 5 deletions src/feature/root/components/RendingBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ export const RendingBody = () => {

const slides = [
{
src: '/assets/rending/new-swipe/1.svg',
src: '/assets/rending/new-swipe/1.png',
alt: '앨범 목록 화면',
width: 260,
height: 530.31,
title: '이벤트마다 만드는 공유앨범',
description: '감튀 모임부터 찐친 여행까지',
},
{
src: '/assets/rending/new-swipe/2.svg',
src: '/assets/rending/new-swipe/2.png',
alt: 'QR 코드 공유',
width: 260,
height: 530.31,
title: '이벤트마다 모인 자리에서 바로 공유',
description: '감튀 모임부터 앨범 만들고 초대까지 딱 10초',
},
{
src: '/assets/rending/new-swipe/3.svg',
src: '/assets/rending/new-swipe/3.png',
alt: '베스트컷',
width: 312.56,
height: 530.31,
title: '이벤트마다 한눈에 보는 베스트컷',
description: '사진 고르는 고민 이제 끝',
},
{
src: '/assets/rending/new-swipe/4.svg',
src: '/assets/rending/new-swipe/4.png',
alt: '네컷추억',
width: 288.8,
height: 530.31,
Expand Down Expand Up @@ -134,7 +134,7 @@ export const RendingBody = () => {

{/* 하단 흰색 배경 영역 */}
<div
className='absolute bottom-0 z-10 flex w-full flex-col items-center bg-white px-4 pt-8'
className='absolute bottom-0 z-10 flex h-[242px] w-full flex-col items-center bg-white px-4 pt-8'
style={{ paddingBottom: 'calc(env(safe-area-inset-bottom) + 20px)' }}
>
{/* 텍스트 및 인디케이터 영역 - 스와이프 가능 */}
Expand Down
13 changes: 8 additions & 5 deletions src/feature/root/components/ScreenNewRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const ScreenNewRoot = () => {
const { isAuthed } = useCheckAuth();
const [showSplash, setShowSplash] = useState(true);

console.log('ScreenNewRoot - isAuthed:', isAuthed, 'showSplash:', showSplash);

// 비로그인 상태일 때만 2초 후 스플래시 숨김
useEffect(() => {
if (isAuthed === false) {
Expand All @@ -21,12 +19,17 @@ const ScreenNewRoot = () => {
}
}, [isAuthed]);

// 인증 확인 중이거나 비로그인 상태에서 스플래시 표시 중일 때
if (isAuthed === null || (isAuthed === false && showSplash)) {
// 인증 확인 중일 때
if (isAuthed === null) {
return <FlashRending />;
}

// 비로그인이고 스플래시 표시 중일 때
if (isAuthed === false && showSplash) {
return <FlashRending />;
}
Comment on lines +22 to 30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

두 개의 if 문에서 동일한 FlashRending 컴포넌트를 반환하고 있습니다. 로직을 하나로 합치면 코드가 더 간결해지고 유지보수하기 좋아질 것 같습니다. 가독성을 높이기 위해 조건을 별도 변수로 추출하는 방법을 제안합니다.

Suggested change
// 인증 확인 중일 때
if (isAuthed === null) {
return <FlashRending />;
}
// 비로그인이고 스플래시 표시 중일 때
if (isAuthed === false && showSplash) {
return <FlashRending />;
}
// 인증 확인 중이거나 비로그인 상태에서 스플래시를 표시해야 할 때
const shouldShowSplash = isAuthed === null || (isAuthed === false && showSplash);
if (shouldShowSplash) {
return <FlashRending />;
}


// 로그인 상태이거나 스플래시 시간이 지난 비로그인 사용자
// 로그인 상태이거나 비로그인에서 스플래시 시간이 지난 경우
return (
<div className='bg-background-brand flex h-screen flex-col items-center justify-center'>
<RendingBody />
Expand Down
Loading