File tree Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { ossStats } from './stats'
2
2
import { httpRouter } from 'convex/server'
3
3
import { betterAuthComponent } from './auth'
4
- import { createAuth } from '../src/server/auth'
4
+ import { createAuth } from '../src/server/auth.server '
5
5
6
6
const http = httpRouter ( )
7
7
Original file line number Diff line number Diff line change @@ -4,11 +4,15 @@ import { FaGithub, FaGoogle } from 'react-icons/fa'
4
4
import splashLightImg from '~/images/splash-light.png'
5
5
import splashDarkImg from '~/images/splash-dark.png'
6
6
import { redirect } from '@tanstack/react-router'
7
+ import { api } from 'convex/_generated/api'
8
+ import { convexQuery } from '@convex-dev/react-query'
7
9
8
10
export const Route = createFileRoute ( {
9
11
component : LoginPage ,
10
12
loader : async ( { context } ) => {
11
- const user = await context . ensureUser ( )
13
+ const user = await context . queryClient . ensureQueryData (
14
+ convexQuery ( api . auth . getCurrentUser , { } )
15
+ )
12
16
13
17
if ( user ) {
14
18
throw redirect ( { to : '/account' } )
Original file line number Diff line number Diff line change 1
- import { reactStartHandler } from "~/server/auth"
2
-
1
+ import { reactStartHandler } from "~/server/auth.server"
3
2
4
3
export const ServerRoute = createServerFileRoute ( ) . methods ( {
5
4
GET : ( { request } ) => {
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import { convexAdapter } from '@convex-dev/better-auth'
2
2
import { convex } from '@convex-dev/better-auth/plugins'
3
3
import { betterAuth } from 'better-auth'
4
4
import { reactStartHelpers } from '@convex-dev/better-auth/react-start'
5
- import { GenericCtx } from 'convex/_generated/server'
6
- import { betterAuthComponent } from 'convex/auth'
5
+ import { GenericCtx } from '../../ convex/_generated/server'
6
+ import { betterAuthComponent } from '../../ convex/auth'
7
7
8
8
// You'll want to replace this with an environment variable
9
9
const siteUrl = process . env . URL
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export async function getSponsorsAndTiers() {
139
139
}
140
140
141
141
async function getGithubSponsors ( ) {
142
- let sponsors : Sponsor = [ ]
142
+ let sponsors : Sponsor [ ] = [ ]
143
143
try {
144
144
const fetchPage = async ( cursor = '' ) => {
145
145
const res = await graphqlWithAuth (
@@ -228,6 +228,10 @@ async function getGithubSponsors() {
228
228
console . error ( 'Missing github credentials, returning mock data.' )
229
229
return [ ]
230
230
}
231
+ if ( err . status === 403 ) {
232
+ console . error ( 'GitHub rate limit exceeded, returning empty sponsors.' )
233
+ return [ ]
234
+ }
231
235
throw err
232
236
}
233
237
}
You can’t perform that action at this time.
0 commit comments