-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ui): Add clerk components to landing page (#3721)
Co-authored-by: Nikos Douvlis <[email protected]> Co-authored-by: Joe Bell <[email protected]>
- Loading branch information
1 parent
0ef6dda
commit 3d3d5ae
Showing
5 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
import { SignedIn, SignedOut, SignInButton, SignOutButton, SignUpButton } from '@clerk/nextjs'; | ||
|
||
function Button({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<button className='relative isolate rounded border bg-white bg-gradient-to-b from-white to-neutral-50 px-2.5 py-1 text-sm font-medium'> | ||
{children} | ||
</button> | ||
); | ||
} | ||
|
||
export default function Home() { | ||
return null; | ||
return ( | ||
<div className='relative'> | ||
<SignedIn> | ||
<SignOutButton> | ||
<Button>Sign out</Button> | ||
</SignOutButton> | ||
</SignedIn> | ||
<SignedOut> | ||
<div className='flex flex-col gap-4'> | ||
<SignInButton> | ||
<Button>Sign in</Button> | ||
</SignInButton> | ||
<SignUpButton> | ||
<Button>Sign up</Button> | ||
</SignUpButton> | ||
</div> | ||
</SignedOut> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
async redirects() { | ||
return [ | ||
{ | ||
source: '/', | ||
destination: '/sign-in', | ||
permanent: false, | ||
}, | ||
]; | ||
}, | ||
}; | ||
const nextConfig = {}; | ||
|
||
export default nextConfig; |