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: 로그인 리디렉션 #294

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

fix: 로그인 리디렉션 #294

wants to merge 3 commits into from

Conversation

gaeunnlee
Copy link
Contributor

What is this PR?

  • 로그인 리디렉션 되도록 수정

What has changed?

  • 리디렉션 페이지에 navigate를 추가하였습니다

A notice to reviewers...

  • 로그아웃 상태에서 로그인이 필요한 페이지로 이동했을 때 로그인 페이지로 리디렉션이 되는지 확인 바랍니다

@gaeunnlee gaeunnlee requested a review from ho991217 July 4, 2023 01:45

function AuthRoute({ children }: { children: JSX.Element }) {
const { isLogin } = useLogin();
const navigate = useNavigate();
useEffect(()=>{
navigate('/login')
Copy link
Owner

Choose a reason for hiding this comment

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

이렇게 하면 로그인이 되어있어도 /login으로 이동하지 않나?

@developerChans
Copy link
Collaborator

@gaeunnlee check this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants