Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/react/start-supabase-basic/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { seo } from '../utils/seo'
import { getSupabaseServerClient } from '../utils/supabase'

const fetchUser = createServerFn({ method: 'GET' }).handler(async () => {
const supabase = await getSupabaseServerClient()
const supabase = getSupabaseServerClient()
const { data, error: _error } = await supabase.auth.getUser()

if (!data.user?.email) {
Expand Down
2 changes: 1 addition & 1 deletion examples/react/start-supabase-basic/src/routes/_authed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getSupabaseServerClient } from '../utils/supabase'
export const loginFn = createServerFn({ method: 'POST' })
.validator((d: { email: string; password: string }) => d)
.handler(async ({ data }) => {
const supabase = await getSupabaseServerClient()
const supabase = getSupabaseServerClient()
const { error } = await supabase.auth.signInWithPassword({
email: data.email,
password: data.password,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/start-supabase-basic/src/routes/logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createServerFn } from '@tanstack/react-start'
import { getSupabaseServerClient } from '../utils/supabase'

const logoutFn = createServerFn().handler(async () => {
const supabase = await getSupabaseServerClient()
const supabase = getSupabaseServerClient()
const { error } = await supabase.auth.signOut()

if (error) {
Expand Down
2 changes: 1 addition & 1 deletion examples/react/start-supabase-basic/src/routes/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const signupFn = createServerFn({ method: 'POST' })
(d: { email: string; password: string; redirectUrl?: string }) => d,
)
.handler(async ({ data }) => {
const supabase = await getSupabaseServerClient()
const supabase = getSupabaseServerClient()
const { error } = await supabase.auth.signUp({
email: data.email,
password: data.password,
Expand Down