Open History to see the last commit
1import { Button, Flex } from '@radix-ui/themes';
2import { Link } from '@tanstack/react-router';
3import type { User } from '@workos-inc/node';
4β
5export default function SignInButton({ large, user, url }: { large?: boolean; user: User | null; url: string }) {
6 if (user) {
7 return (
8 <Flex gap="3">
9 <Button asChild size={large ? '3' : '2'}>
10 <Link to="/logout">Sign Out</Link>
11 </Button>
12 </Flex>
13 );
14 }
15β
16 return (
17 <Button asChild size={large ? '3' : '2'}>
18 <a href={url}>Sign In{large && ' with AuthKit'}</a>
19 </Button>
20 );
21}