mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
Refactored to use app folder.
This commit is contained in:
parent
40cfcd41e9
commit
9a52cdd2e1
258 changed files with 2025 additions and 2258 deletions
20
src/app/sso/page.tsx
Normal file
20
src/app/sso/page.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
'use client';
|
||||
import { useEffect } from 'react';
|
||||
import { Loading } from 'react-basics';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { setClientAuthToken } from 'lib/client';
|
||||
|
||||
export default function ({ params }) {
|
||||
const router = useRouter();
|
||||
const { token, url } = params;
|
||||
|
||||
useEffect(() => {
|
||||
if (url && token) {
|
||||
setClientAuthToken(token);
|
||||
|
||||
router.push(url);
|
||||
}
|
||||
}, [router, url, token]);
|
||||
|
||||
return <Loading size="xl" />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue