mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
style: fixed for deepscan
This commit is contained in:
parent
61a0304c2c
commit
fd7e2e1928
@ -15,6 +15,7 @@ const DiscordCallback:NextPage<DiscordCallbackProps> = ({ data }) => {
|
|||||||
const [ redirect, setRedirect ] = useState(false)
|
const [ redirect, setRedirect ] = useState(false)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(!data) router.push('/api/auth/discord')
|
if(!data) router.push('/api/auth/discord')
|
||||||
|
else {
|
||||||
localStorage.userCache = JSON.stringify({
|
localStorage.userCache = JSON.stringify({
|
||||||
id: data.id,
|
id: data.id,
|
||||||
username: data.username,
|
username: data.username,
|
||||||
@ -22,6 +23,7 @@ const DiscordCallback:NextPage<DiscordCallbackProps> = ({ data }) => {
|
|||||||
version: 2
|
version: 2
|
||||||
})
|
})
|
||||||
setRedirect(true)
|
setRedirect(true)
|
||||||
|
}
|
||||||
|
|
||||||
}, [ data, router ])
|
}, [ data, router ])
|
||||||
function redirectWhere() {
|
function redirectWhere() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user