init commit,

This commit is contained in:
louiscklaw
2025-05-28 09:55:51 +08:00
commit efe70ceb69
8042 changed files with 951668 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
'use client'
import useSupabaseBrowser from '@/utils/supabase-browser'
import { getCountryById } from '@/queries/get-country-by-id'
import { useQuery } from '@supabase-cache-helpers/postgrest-react-query'
export default function CountryPage({ params }: { params: { id: number } }) {
const supabase = useSupabaseBrowser()
const {
data: country,
isLoading,
isError,
} = useQuery(getCountryById(supabase, params.id))
if (isLoading) {
return <div>Loading...</div>
}
if (isError || !country) {
return <div>Error</div>
}
return (
<div>
<h1>{country.name}</h1>
</div>
)
}