Skip to content

Commit

Permalink
fix: qfeed-151 랜딩페이지 버그 수정 (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
jymaeng1234 authored Dec 21, 2024
1 parent 5cc2d57 commit 891616e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pages/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ import { Logo } from '@/components/ui/Logo/Logo';
import { STYLE } from '@/pages/Landing/Constants/style';
import { Container, LogoWrapper, SubTitle, Title } from '@/pages/Landing/styles';
import { useEffect } from 'react';
import { useNavigate } from 'react-router';
import { useNavigation } from '@/hooks/useNavigation';

const LandingPage = () => {
const navigate = useNavigate();
const { gotoLogin } = useNavigation();

useEffect(() => {
// 3초 후에 로그인 페이지로 자동 이동
const timer = setTimeout(() => {
navigate('/login');
gotoLogin();
}, 1000);

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

return (
Expand Down

0 comments on commit 891616e

Please sign in to comment.