refactor: organized component folder structure
fix: scrolling in login page
This commit is contained in:
parent
138970f4c3
commit
a412d0710b
15 changed files with 31 additions and 31 deletions
30
src/components/buttons/sso-login-button.tsx
Normal file
30
src/components/buttons/sso-login-button.tsx
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { signIn } from '@/auth';
|
||||
import { IconButton } from '@/components/buttons/icon-button';
|
||||
import { faOpenid } from '@fortawesome/free-brands-svg-icons';
|
||||
|
||||
export default function SSOLogin({
|
||||
provider,
|
||||
providerDisplayName,
|
||||
}: {
|
||||
provider: string;
|
||||
providerDisplayName: string;
|
||||
}) {
|
||||
return (
|
||||
<form
|
||||
className='flex flex-col items-center w-full'
|
||||
action={async () => {
|
||||
'use server';
|
||||
await signIn(provider);
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
className='w-full'
|
||||
type='submit'
|
||||
variant='secondary'
|
||||
icon={faOpenid}
|
||||
>
|
||||
Login with {providerDisplayName}
|
||||
</IconButton>
|
||||
</form>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue