Skip to content

Commit

Permalink
refactor: SplashScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
Dindb-dong committed Feb 12, 2025
1 parent 2360519 commit d65cd7e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
28 changes: 14 additions & 14 deletions src/common/SplashScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import React from 'react';
import LottieView from 'lottie-react-native';
import React, { useEffect } from 'react';
import { Dimensions, View } from 'react-native';
import { PURPLE } from '../styles/GlobalColor';
import Logo from '../assets/common/Logo.svg';

const SplashScreen = ({ onFinish }: { onFinish: () => void }) => {
const { width, height } = Dimensions.get('screen');
useEffect(() => {
const timer = setTimeout(() => {
onFinish();
}, 2000); // 2초 후 실행

return () => clearTimeout(timer); // 컴포넌트가 언마운트될 때 타이머 정리
}, []);

return (
<View
Expand All @@ -15,18 +22,11 @@ const SplashScreen = ({ onFinish }: { onFinish: () => void }) => {
justifyContent: 'center',
alignItems: 'center',
}}>
<View
style={{
width: '90%',
height: '80%',
}}>
<LottieView
source={require('../assets/common/lottie/animation/SplashAnimation.json')}
onAnimationFinish={onFinish}
loop={false}
autoPlay
/>
</View>
<Logo
color="#fff"
width="90px"
height="40px"
/>
</View>
);
};
Expand Down
11 changes: 0 additions & 11 deletions src/components/Auth/Reformer/ReformFormCareer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1074,17 +1074,6 @@ export default function ReformCareer({ fix, form, setForm }: ReformProps) {
: handleFix}
style={{ width: '90%', alignSelf: 'center', marginBottom: 10 }}
/>
{fix && // TODO: 이거 배포 전에는 삭제하기! (디버깅용)
<View>
<BottomButton
value="check"
pressed={false}
onPress={() => {
console.log(form);
}}
style={{ width: '90%', alignSelf: 'center', marginBottom: 10 }}
/>
</View>}
</View>
{careerIndex >= 0 && (
<CareerModal
Expand Down

0 comments on commit d65cd7e

Please sign in to comment.