mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-27 04:45:54 +01:00
20 lines
436 B
JavaScript
20 lines
436 B
JavaScript
import { useEffect } from 'react';
|
|
import { Loading } from 'react-basics';
|
|
import { useRouter } from 'next/router';
|
|
import { setClientAuthToken } from 'lib/client';
|
|
|
|
export default function () {
|
|
const router = useRouter();
|
|
const { token, url } = router.query;
|
|
|
|
useEffect(() => {
|
|
if (url && token) {
|
|
setClientAuthToken(token);
|
|
|
|
router.push(url);
|
|
}
|
|
}, [router, url, token]);
|
|
|
|
return <Loading size="xl" />;
|
|
}
|