Skip to content

Commit f97d3ed

Browse files
committed
fix clerk
1 parent 1b6deb6 commit f97d3ed

File tree

8 files changed

+46
-466
lines changed

8 files changed

+46
-466
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"linkAll": "node scripts/link.js"
1818
},
1919
"dependencies": {
20-
"@clerk/tanstack-start": "^0.11.5",
20+
"@clerk/tanstack-react-start": "^0.21.5",
2121
"@convex-dev/react-query": "0.0.0-alpha.8",
2222
"@erquhart/convex-oss-stats": "^0.5.5",
2323
"@floating-ui/react": "^0.27.8",

pnpm-lock.yaml

Lines changed: 31 additions & 455 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/router.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { DefaultCatchBoundary } from './components/DefaultCatchBoundary'
77
import { NotFound } from './components/NotFound'
88
import { QueryClient } from '@tanstack/react-query'
99
import { GamOnPageChange } from './components/Gam'
10+
import { ClerkProvider } from '@clerk/tanstack-react-start'
1011

1112
export function createRouter() {
1213
const CONVEX_URL =

src/routes/__root.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Scripts,
1212
} from '@tanstack/react-router'
1313
import { QueryClient } from '@tanstack/react-query'
14-
import { ClerkProvider } from '@clerk/tanstack-start'
14+
import { ClerkProvider } from '@clerk/tanstack-react-start'
1515
import appCss from '~/styles/app.css?url'
1616
import carbonStyles from '~/styles/carbon.css?url'
1717
import { seo } from '~/utils/seo'
@@ -150,12 +150,15 @@ export const Route = createRootRouteWithContext<{
150150
})
151151

152152
function RootComponent() {
153+
// Import your Publishable Key
154+
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
155+
156+
if (!PUBLISHABLE_KEY) {
157+
throw new Error('Add your Clerk Publishable Key to the .env file')
158+
}
159+
153160
return (
154-
<ClerkProvider
155-
waitlistUrl="/login"
156-
afterSignInUrl="/dashboard"
157-
afterSignUpUrl="/dashboard"
158-
>
161+
<ClerkProvider publishableKey={PUBLISHABLE_KEY}>
159162
<SearchProvider>
160163
<RootDocument>
161164
<Outlet />

src/routes/_libraries/account.$.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
UserProfile,
55
SignInButton,
66
SignOutButton,
7-
} from '@clerk/tanstack-start'
7+
} from '@clerk/tanstack-react-start'
88
import { FaSignOutAlt } from 'react-icons/fa'
99

1010
export const Route = createFileRoute({

src/routes/_libraries/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
UserButton,
55
Waitlist,
66
SignIn,
7-
} from '@clerk/tanstack-start'
7+
} from '@clerk/tanstack-react-start'
88
import * as React from 'react'
99

1010
export const Route = createFileRoute({

src/routes/_libraries/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { Link, Outlet, useLocation } from '@tanstack/react-router'
3-
import { SignedIn, SignedOut, UserButton } from '@clerk/tanstack-start'
3+
import { SignedIn, SignedOut, UserButton } from '@clerk/tanstack-react-start'
44
import { CgClose, CgMenuLeft, CgMusicSpeaker } from 'react-icons/cg'
55
import { MdLibraryBooks, MdLineAxis, MdSupport } from 'react-icons/md'
66
import { twMerge } from 'tailwind-merge'

src/server/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createServerFn } from '@tanstack/react-start'
2-
import { getAuth } from '@clerk/tanstack-start/server'
2+
import { getAuth } from '@clerk/tanstack-react-start/server'
33
import { getWebRequest } from '@tanstack/react-start/server'
44
import { redirect } from '@tanstack/react-router'
55

0 commit comments

Comments
 (0)