Skip to content

Commit 101a491

Browse files
authored
Updated NextJS "Client-side data fetching with RLS" Documentation
Updated the Client-side data fetching with RLS Documentation since `ThemeSupa` is not imported from `auth-ui-react` anymore but imported in `auth-ui-shared`
1 parent ab96390 commit 101a491

File tree

1 file changed

+2
-1
lines changed
  • apps/docs/pages/guides/auth/auth-helpers

1 file changed

+2
-1
lines changed

apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
185185
For [row level security](/docs/learn/auth-deep-dive/auth-row-level-security) to work properly when fetching data client-side, you need to make sure to use the `supabaseClient` from the `useSupabaseClient` hook and only run your query once the user is defined client-side in the `useUser()` hook:
186186

187187
```jsx lines=10-17
188-
import { Auth, ThemeSupa } from '@supabase/auth-ui-react'
188+
import { Auth } from '@supabase/auth-ui-react'
189+
import { ThemeSupa } from '@supabase/auth-ui-shared'
189190
import { useUser, useSupabaseClient } from '@supabase/auth-helpers-react'
190191
import { useEffect, useState } from 'react'
191192

0 commit comments

Comments
 (0)