feat: added button styling and updated login layout
This commit is contained in:
parent
d86c86e137
commit
77ef7038d2
9 changed files with 196 additions and 29 deletions
|
@ -1,20 +1,18 @@
|
|||
import { auth } from '@/auth';
|
||||
import SignIn from '@/components/user/signin-button';
|
||||
import { SignOut } from '@/components/user/signout-button';
|
||||
import Login from '@/components/user/login-button';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
export default async function Login() {
|
||||
export default async function LoginPage() {
|
||||
const session = await auth();
|
||||
|
||||
if (session?.user) {
|
||||
redirect('/');
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Login</h1>
|
||||
{!session?.user ? (
|
||||
<SignIn></SignIn>
|
||||
) : (
|
||||
<>
|
||||
<h2>Hallo {session.user.name}</h2>
|
||||
<SignOut></SignOut>
|
||||
</>
|
||||
)}
|
||||
<Login provider='authentik' providerDisplayName='SSO' />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue