Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clerk example updates #50021

Merged
merged 27 commits into from May 22, 2023
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/with-clerk/README.md
Expand Up @@ -4,13 +4,13 @@ This example shows how to use [Clerk](https://www.clerk.dev/?utm_source=github&u

## Demo

A hosted demo of this example is available at [clerk-nextjs-example.vercel.app](https://clerk-nextjs-example.vercel.app)
A hosted demo of this example is available at [clerk-app-router.clerkpreview.com](https://clerk-app-router.clerkpreview.com/).

## Deploy your own

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/clerkinc/clerk-nextjs-starter&integration-ids=oac_7uYNbc9CdDAZmNqbt3LEkO3a)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/clerkinc/clerk-next-app-router-starter&integration-ids=oac_7uYNbc9CdDAZmNqbt3LEkO3a)
leerob marked this conversation as resolved.
Show resolved Hide resolved

## How to use

Expand Down
6 changes: 3 additions & 3 deletions examples/with-clerk/app/layout.tsx
Expand Up @@ -9,8 +9,8 @@ import Link from 'next/link'
const inter = Inter({ subsets: ['latin'] })

export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
title: 'Clerk with App Router',
description: 'Power your Next.js application with Clerk ',
}

const Header = () => (
Expand All @@ -26,7 +26,7 @@ const Header = () => (
<Link href="/sign-in">Sign in</Link>
</SignedOut>
<SignedIn>
<UserButton />
<UserButton afterSignOutUrl="/" />
</SignedIn>
</div>
</header>
Expand Down
7 changes: 6 additions & 1 deletion examples/with-clerk/app/sign-in/[[...sign-in]]/page.tsx
@@ -1,5 +1,10 @@
import { SignIn } from '@clerk/nextjs'
import styles from '../../../styles/Auth.module.css'

export default function Page() {
return <SignIn />
return (
<div className={styles.auth}>
<SignIn />
</div>
)
}
7 changes: 6 additions & 1 deletion examples/with-clerk/app/sign-up/[[...sign-up]]/page.tsx
@@ -1,5 +1,10 @@
import { SignUp } from '@clerk/nextjs'
import styles from '../../../styles/Auth.module.css'

export default function Page() {
return <SignUp />
return (
<div className={styles.auth}>
<SignUp />
</div>
)
}
11 changes: 8 additions & 3 deletions examples/with-clerk/app/user/[[...index]]/page.tsx
@@ -1,5 +1,10 @@
import { UserProfile } from '@clerk/nextjs'
import styles from '../../../styles/User.module.css'

const UserProfilePage = () => <UserProfile />

export default UserProfilePage
export default function Page() {
return (
<div className={styles.user}>
<UserProfile />
</div>
)
}
7 changes: 7 additions & 0 deletions examples/with-clerk/styles/Auth.module.css
@@ -0,0 +1,7 @@
.auth {
width: 100vw;
height: 90vh;
display: flex;
justify-content: center;
align-items: center;
}
3 changes: 2 additions & 1 deletion examples/with-clerk/styles/Home.module.css
Expand Up @@ -9,6 +9,7 @@
}

.main {
width: 100%;
max-width: 540px;
padding-top: 2rem;
flex: 1;
Expand Down Expand Up @@ -59,7 +60,7 @@
}

.cards {
margin: 2rem;
margin: 0;
}

.card {
Expand Down
5 changes: 5 additions & 0 deletions examples/with-clerk/styles/User.module.css
@@ -0,0 +1,5 @@
.user {
width: 100vw;
display: flex;
justify-content: center;
}