import Link from 'next/link' import Step from './Step' import Code from '@/components/Code' const create = ` create table notes ( id serial primary key, title text ); insert into notes(title) values ('Today I created a Supabase project.'), ('I added some data and queried it from Next.js.'), ('It was awesome!'); `.trim() const server = ` import { createClient } from '@/utils/supabase/server' import { cookies } from 'next/headers' export default async function Page() { const cookieStore = cookies() const supabase = createClient(cookieStore) const { data: notes } = await supabase.from('notes').select() return
{JSON.stringify(notes, null, 2)}} `.trim() const client = ` 'use client' import { createClient } from '@/utils/supabase/client' import { useEffect, useState } from 'react' export default function Page() { const [notes, setNotes] = useState
{JSON.stringify(notes, null, 2)}} `.trim() export default function SignUpUserSteps() { return (
Head over to the{' '} Login {' '} page and sign up your first user. It's okay if this is just you for now. Your awesome idea will have plenty of users later!
Head over to the{' '} Table Editor {' '} for your Supabase project to create a table and insert some example data. If you're stuck for creativity, you can copy and paste the following into the{' '} SQL Editor {' '} and click RUN!
To create a Supabase client and query data from an Async Server Component, create a new page.tsx file at{' '} /app/notes/page.tsx {' '} and add the following.
Alternatively, you can use a Client Component.
You're ready to launch your product to the world! 🚀