Unverified Commit 8eec4920 authored by Aryan Beezadhur's avatar Aryan Beezadhur Committed by GitHub

Rename `utils` to `lib` (#29651)

Rename all instances of `utils` to `lib` in this example to maintain consistency with other examples.
parent aeafca2b
import { Auth } from '@supabase/ui' import { Auth } from '@supabase/ui'
import { supabase } from '../utils/initSupabase' import { supabase } from '../lib/initSupabase'
import './../style.css' import './../style.css'
export default function MyApp({ Component, pageProps }) { export default function MyApp({ Component, pageProps }) {
......
/** /**
* NOTE: this file is only needed if you're doing SSR (getServerSideProps)! * NOTE: this file is only needed if you're doing SSR (getServerSideProps)!
*/ */
import { supabase } from '../../utils/initSupabase' import { supabase } from '../../lib/initSupabase'
export default function handler(req, res) { export default function handler(req, res) {
supabase.auth.api.setAuthCookie(req, res) supabase.auth.api.setAuthCookie(req, res)
......
import { supabase } from '../../utils/initSupabase' import { supabase } from '../../lib/initSupabase'
// Example of how to verify and get user data server-side. // Example of how to verify and get user data server-side.
const getUser = async (req, res) => { const getUser = async (req, res) => {
......
import Link from 'next/link' import Link from 'next/link'
import useSWR from 'swr' import useSWR from 'swr'
import { Auth, Card, Typography, Space, Button, Icon } from '@supabase/ui' import { Auth, Card, Typography, Space, Button, Icon } from '@supabase/ui'
import { supabase } from '../utils/initSupabase' import { supabase } from '../lib/initSupabase'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
const fetcher = (url, token) => const fetcher = (url, token) =>
......
import Link from 'next/link' import Link from 'next/link'
import { Card, Typography, Space } from '@supabase/ui' import { Card, Typography, Space } from '@supabase/ui'
import { supabase } from '../utils/initSupabase' import { supabase } from '../lib/initSupabase'
export default function Profile({ user }) { export default function Profile({ user }) {
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment