-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from GihoKo/dev
refactor: 필요없는 코드 삭제
- Loading branch information
Showing
2 changed files
with
14 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
// hooks | ||
import useRenewTokens from '@/apis/hooks/useRenewTokens'; | ||
import { useApplicationAuthTokenStore } from '@/store/useAuthStore'; | ||
import { useEffect } from 'react'; | ||
// // hooks | ||
// import useRenewTokens from '@/apis/hooks/useRenewTokens'; | ||
// import { useApplicationAuthTokenStore } from '@/store/useAuthStore'; | ||
// import { useEffect } from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
export default function useMainPage() { | ||
const navigate = useNavigate(); | ||
const { setAccessToken } = useApplicationAuthTokenStore(); | ||
const { data, isLoading, isSuccess, isError } = useRenewTokens(); | ||
// const { setAccessToken } = useApplicationAuthTokenStore(); | ||
// const { data, isLoading, isSuccess, isError } = useRenewTokens(); | ||
|
||
useEffect(() => { | ||
if (isSuccess) { | ||
setAccessToken(data.accessToken); | ||
} | ||
}, [data]); | ||
// useEffect(() => { | ||
// if (isSuccess) { | ||
// setAccessToken(data.accessToken); | ||
// } | ||
// }, [data]); | ||
|
||
return { isLoading, isError, navigate }; | ||
return { navigate }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters