Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Advanced Clerk auth patterns for Next.js: Server Actions, middleware, caching, and App Router integration.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
templates/nextjs-basic-auth/app/layout.tsx
1import { ClerkProvider, Show, SignInButton, SignUpButton, UserButton } from '@clerk/nextjs'23export default function RootLayout({ children }: { children: React.ReactNode }) {4return (5<html lang="en">6<body>7<ClerkProvider>8<header>9<Show when="signed-out">10<SignInButton />11<SignUpButton />12</Show>13<Show when="signed-in">14<UserButton />15</Show>16</header>17{children}18</ClerkProvider>19</body>20</html>21)22}23