Skip to content

Commit

Permalink
fix: add config to example
Browse files Browse the repository at this point in the history
  • Loading branch information
psteinroe committed Aug 24, 2023
1 parent fe6cffe commit d7c199d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions examples/swr/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useState } from "react"
import Head from "next/head"
import { createBrowserSupabaseClient } from "@supabase/auth-helpers-nextjs"
import { SessionContextProvider } from "@supabase/auth-helpers-react"
import { SWRConfig } from "swr"

const fontSans = FontSans({
subsets: ["latin"],
Expand Down Expand Up @@ -54,15 +55,17 @@ export default function App({ Component, pageProps }: AppProps) {
content="https://supabase-cache-helpers.vercel.app/og-image.png"
/>
</Head>
<SessionContextProvider
supabaseClient={supabaseClient}
initialSession={pageProps.initialSession}
>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<Component {...pageProps} />
<Analytics />
</ThemeProvider>
</SessionContextProvider>
<SWRConfig value={{ revalidateIfStale: false, revalidateOnFocus: false }}>
<SessionContextProvider
supabaseClient={supabaseClient}
initialSession={pageProps.initialSession}
>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<Component {...pageProps} />
<Analytics />
</ThemeProvider>
</SessionContextProvider>
</SWRConfig>
</>
)
}

3 comments on commit d7c199d

@vercel
Copy link

@vercel vercel bot commented on d7c199d Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

supabase-cache-helpers-react-query – ./examples/react-query

supabase-cache-helpers-react-query-psteinroe.vercel.app
supabase-cache-helpers-react-query.vercel.app
supabase-cache-helpers-react-query-git-main-psteinroe.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d7c199d Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

supabase-cache-helpers-swr-demo – ./examples/swr

supabase-cache-helpers-swr.vercel.app
supabase-cache-helpers-swr-demo-git-main-psteinroe.vercel.app
supabase-cache-helpers-swr-demo-psteinroe.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d7c199d Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.