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,21 @@
'use client'
import { useEffect, useState } from 'react'
import supabase from '../../utils/supabase'
export default function ClientPosts() {
const [isLoading, setIsLoading] = useState(true)
const [posts, setPosts] = useState<any>([])
useEffect(() => {
const fetchPosts = async () => {
const { data } = await supabase.from('posts').select()
setPosts(data)
setIsLoading(false)
}
fetchPosts()
}, [])
return isLoading ? <p>Loading</p> : <pre>{JSON.stringify(posts, null, 2)}</pre>
}