diff --git a/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx b/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx index a6633706faa62..14690e27cc3b5 100644 --- a/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx +++ b/apps/docs/content/guides/getting-started/quickstarts/nextjs.mdx @@ -59,12 +59,12 @@ hideToc: true - - + + - Create a new file at `app/instruments/page.tsx` and populate with the following. + Create a new file at `utils/supabase/server.ts` and populate with the following. - This will select all the rows from the `instruments` table in Supabase and render them on the page. + This creates a Supabase client, using the credentials from the `env.local` file. @@ -72,17 +72,6 @@ hideToc: true <$CodeTabs> - ```ts name=app/instruments/page.tsx - import { createClient } from '@/utils/supabase/server'; - - export default async function Instruments() { - const supabase = await createClient(); - const { data: instruments } = await supabase.from("instruments").select(); - - return
{JSON.stringify(instruments, null, 2)}
- } - ``` - ```ts name=utils/supabase/server.ts import { createServerClient } from '@supabase/ssr' import { cookies } from 'next/headers' @@ -122,6 +111,36 @@ hideToc: true
+ + + Create a new file at `app/instruments/page.tsx` and populate with the following. + + This selects all the rows from the `instruments` table in Supabase and render them on the page. + + + + + + <$CodeTabs> + + ```ts name=app/instruments/page.tsx + import { createClient } from '@/utils/supabase/server'; + + export default async function Instruments() { + const supabase = await createClient(); + const { data: instruments } = await supabase.from("instruments").select(); + + return
{JSON.stringify(instruments, null, 2)}
+ } + ``` + + + +
+ +
+ + Run the development server, go to http://localhost:3000/instruments in a browser and you should see the list of instruments. diff --git a/apps/studio/data/permissions/permissions-query.ts b/apps/studio/data/permissions/permissions-query.ts index 5de290221cc71..975786dd73bca 100644 --- a/apps/studio/data/permissions/permissions-query.ts +++ b/apps/studio/data/permissions/permissions-query.ts @@ -31,7 +31,7 @@ export const usePermissionsQuery = ({ { ...options, enabled: IS_PLATFORM && enabled && isLoggedIn, - staleTime: 30 * 60 * 1000, + staleTime: 5 * 60 * 1000, } ) }