Skip to content

Commit 03fb3d2

Browse files
authored
chore/update deps (#151)
* chore: update deps * chore: downgrade radix-themes * chore: format file
1 parent 78fe9ef commit 03fb3d2

File tree

15 files changed

+2329
-1972
lines changed

15 files changed

+2329
-1972
lines changed

app/auth/actions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function signinUser(
3131
const fields = Object.fromEntries(formData.entries())
3232
const result = parse(SigninSchema, fields)
3333

34-
const supabase = createClient()
34+
const supabase = await createClient()
3535

3636
const { error } = await supabase.auth.signInWithPassword({
3737
email: result.email,
@@ -61,12 +61,12 @@ export async function signinUser(
6161
}
6262

6363
export async function signinUsingProvider(_: unknown, formData: FormData) {
64-
const supabase = createClient()
64+
const supabase = await createClient()
6565

6666
const fields = Object.fromEntries(formData.entries())
6767
const result = parse(ProviderSchema, fields)
6868

69-
const origin = headers().get('origin')
69+
const origin = (await headers()).get('origin')
7070
const redirectTo = `${origin}/auth/callback`
7171

7272
if (result.provider === 'google') {
@@ -105,7 +105,7 @@ export async function signupUser(
105105
formData: FormData
106106
): Promise<typeof INITIAL_SIGNUP_STATE> {
107107
try {
108-
const supabase = createClient()
108+
const supabase = await createClient()
109109

110110
const fields = Object.fromEntries(formData.entries())
111111
const result = parse(SignupSchema, fields)

app/auth/callback/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function GET(request: Request) {
99
const next = searchParams.get('next') ?? '/'
1010

1111
if (code) {
12-
const supabase = createClient()
12+
const supabase = await createClient()
1313
const { error } = await supabase.auth.exchangeCodeForSession(code)
1414
if (!error) {
1515
const forwardedHost = request.headers.get('x-forwarded-host') // original origin before load balancer

app/auth/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ export const metadata: Metadata = {
2424
},
2525
}
2626

27-
export default async function AuthPage({ searchParams }: { searchParams: Record<string, string> }) {
28-
const supabase = createClient()
27+
export default async function AuthPage({ searchParams }: { searchParams: Promise<Record<string, string>> }) {
28+
const supabase = await createClient()
2929
const { data } = await supabase.auth.getUser()
3030

3131
if (data.user) {
3232
redirect('/home')
3333
}
3434

35-
const { type = '' } = searchParams
35+
const { type = '' } = await searchParams
3636

3737
const isSignup = type === 'signup'
3838
const footer = {

app/favorites/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const metadata: Metadata = {
2727
}
2828

2929
export default async function Favorites() {
30-
const supabase = createClient()
30+
const supabase = await createClient()
3131
const { data } = await supabase.auth.getUser()
3232

3333
if (!data.user) {

app/game/[slug]/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export async function toggleFavorite(_: unknown, formData: FormData) {
1111
const fields = Object.fromEntries(formData.entries())
1212
const { gameId, slug, userId } = parse(FavoriteSchema, fields)
1313

14-
const supabase = createClient()
14+
const supabase = await createClient()
1515
let message = ''
1616

1717
const { data } = await supabase.from('user_data').select('*').eq('user_id', userId).single()

app/game/[slug]/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import { PhotoViewer } from './photo-viewer'
1414
import { Share } from './share'
1515

1616
type Props = {
17-
params: { slug: string }
17+
params: Promise<{ slug: string }>
1818
}
1919

2020
export async function generateMetadata({ params }: Props): Promise<Metadata> {
21-
const { slug } = params
21+
const { slug } = await params
2222

2323
try {
2424
const res = await fetch(`https://api.rawg.io/api/games/${slug}?key=${process.env.NEXT_PUBLIC_RAWG_API_KEY}`)
@@ -46,8 +46,8 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
4646
}
4747
}
4848

49-
export default async function GameDetailPage({ params }: { params: Record<string, string> }) {
50-
const { slug } = params
49+
export default async function GameDetailPage({ params }: { params: Promise<Record<string, string>> }) {
50+
const { slug } = await params
5151
let gameDetails: GameDetail | null = null
5252
let gameScreenshots: GameScreenshot['results'] = []
5353

@@ -73,7 +73,7 @@ export default async function GameDetailPage({ params }: { params: Record<string
7373
notFound()
7474
}
7575

76-
const supabase = createClient()
76+
const supabase = await createClient()
7777
const { data } = await supabase.auth.getUser()
7878
let isFavorite = false
7979

app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const metadata: Metadata = {
3131
}
3232

3333
export default async function Home() {
34-
const supabase = createClient()
34+
const supabase = await createClient()
3535
const { data } = await supabase.auth.getUser()
3636

3737
if (data.user) {

app/profile/actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function changeName(
3131
const fields = Object.fromEntries(formData.entries())
3232
const result = parse(NameSchema, fields)
3333

34-
const supabase = createClient()
34+
const supabase = await createClient()
3535

3636
const { error } = await supabase.auth.updateUser({ data: { name: result.name } })
3737

@@ -71,7 +71,7 @@ export async function changePassword(
7171
const fields = Object.fromEntries(formData.entries())
7272
const result = parse(PasswordSchema, fields)
7373

74-
const supabase = createClient()
74+
const supabase = await createClient()
7575

7676
const { error } = await supabase.auth.updateUser({ password: result.password })
7777

@@ -104,7 +104,7 @@ export async function changePassword(
104104
}
105105

106106
export async function signout() {
107-
const supabase = createClient()
107+
const supabase = await createClient()
108108
await supabase.auth.signOut()
109109
redirect('/home')
110110
}

app/profile/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const metadata: Metadata = {
2222
}
2323

2424
export default async function Profile() {
25-
const supabase = createClient()
25+
const supabase = await createClient()
2626
const { data } = await supabase.auth.getUser()
2727

2828
if (!data.user) {

app/search/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export const metadata: Metadata = {
2525
},
2626
}
2727

28-
export default function SearchPage({ searchParams }: { searchParams: Record<string, string> }) {
29-
const { page = '', query = '' } = searchParams
28+
export default async function SearchPage({ searchParams }: { searchParams: Promise<Record<string, string>> }) {
29+
const { page = '', query = '' } = await searchParams
3030

3131
return (
3232
<Box position="relative">

0 commit comments

Comments
 (0)