-
Notifications
You must be signed in to change notification settings - Fork 807
Add code examples for components and hooks #2481
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…erk/clerk-docs into nick/sdk-scoping-components-and-hooks
<main> | ||
<GoogleOneTap /> | ||
</main> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<main> | |
<GoogleOneTap /> | |
</main> | |
<GoogleOneTap /> |
None of the other examples wrap the component in a <main>
so for consistency I recon we leave it out
```tsx {{ filename: 'app/routes/root.tsx' }} | ||
import { ClerkProvider, SignedIn, SignedOut, UserButton, SignInButton } from '@clerk/remix' | ||
|
||
export default function App() { | ||
return ( | ||
<ClerkProvider signUpFallbackRedirectUrl="/" signInFallbackRedirectUrl="/"> | ||
<header className="flex items-center justify-center py-8 px-4"> | ||
<SignedOut> | ||
<SignInButton /> | ||
</SignedOut> | ||
<SignedIn> | ||
<UserButton /> | ||
</SignedIn> | ||
</header> | ||
<main> | ||
<Outlet /> | ||
</main> | ||
</ClerkProvider> | ||
) | ||
} | ||
|
||
// Rest of the root.tsx code | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Remix just doesn't use ClerkProvider
at all, I'm not entirely sure what to do for this example as Remix uses ClerkApp()
(https://clerk.com/docs/quickstarts/remix#configure-clerk-app) But if we remove remix from this page it's not great as the properties are still applicable.
docs/components/authentication/google-one-tap.mdx (Sarah)
docs/components/authentication/sign-in.mdx (Sarah)
docs/components/authentication/sign-up.mdx (Sarah)
docs/components/clerk-provider.mdx (Sarah)
docs/components/control/clerk-loaded.mdx (Sarah)
docs/components/control/clerk-loading.mdx (Sarah)
docs/components/control/redirect-to-createorganization.mdx (Sarah)
docs/components/control/redirect-to-organizationprofile.mdx (Sarah)
docs/components/control/redirect-to-signin.mdx (Sarah)
docs/components/control/redirect-to-signup.mdx (Sarah)
docs/components/control/redirect-to-userprofile.mdx (Sarah)
docs/components/control/signed-in.mdx (Sarah)
docs/components/control/signed-out.mdx (Sarah)
docs/components/organization/create-organization.mdx (Sarah)
docs/components/organization/organization-list.mdx (Nick)
docs/components/organization/organization-profile.mdx (Nick)
docs/components/organization/organization-switcher.mdx (Nick)
docs/components/pricing-table.mdx (Nick)
docs/components/protect.mdx (Nick)
docs/components/unstyled/sign-in-button.mdx (Nick)
docs/components/unstyled/sign-in-with-metamask.mdx (Nick)
docs/components/unstyled/sign-out-button.mdx (Nick)
docs/components/unstyled/sign-up-button.mdx (Nick)
docs/components/user/user-button.mdx (Nick)
docs/components/user/user-profile.mdx (Nick)
docs/components/waitlist.mdx (Nick)
docs/hooks/use-organization.mdx (Nick)
docs/hooks/use-organization-list.mdx (Nick)
FIXES DOCS-10658