@@ -20,10 +20,10 @@ async function getPosts(id: string, token: string) {
2020 } ) ;
2121
2222 if ( ! res . ok ) {
23- return {
24- posts : [ ] ,
25- error : `Failed to fetch posts: ${ res . status } ` ,
26- }
23+ return {
24+ posts : [ ] ,
25+ error : `Failed to fetch posts: ${ res . status } ` ,
26+ } ;
2727 }
2828
2929 const body = await res . json ( ) ;
@@ -33,13 +33,13 @@ async function getPosts(id: string, token: string) {
3333 id : post . id . toString ( ) ,
3434 } ) ) ,
3535 error : null ,
36- }
36+ } ;
3737 } catch ( e ) {
3838 console . error ( "Error fetching posts:" , e ) ;
3939 return {
4040 posts : [ ] ,
4141 error : ( e as Error ) . message ,
42- }
42+ } ;
4343 }
4444}
4545
@@ -49,20 +49,20 @@ export default async function ForumWrapper({
4949 params : Promise < { id : string ; slug : string [ ] | undefined } > ;
5050} ) {
5151 const { id, slug } = await params ;
52- return < Suspense fallback = { < PostsForumPage posts = { [ ] } initalPost = { undefined } /> } >
53- < Forum id = { id } slug = { slug } />
54- </ Suspense >
52+ return (
53+ < Suspense fallback = { < PostsForumPage posts = { [ ] } initalPost = { undefined } /> } >
54+ < Forum id = { id } slug = { slug } />
55+ </ Suspense >
56+ ) ;
5557}
5658
57-
58- async function Forum ( { id, slug} : { id : string , slug : string [ ] | undefined } ) {
59-
59+ async function Forum ( { id, slug } : { id : string ; slug : string [ ] | undefined } ) {
6060 const selectPost = slug ? slug [ 0 ] : undefined ;
6161 const supabase = await createClient ( ) ;
6262 const token = ( await supabase . auth . getSession ( ) ) ?. data . session ?. access_token ;
6363 if ( ! token ) {
6464 redirect ( "auth/login" ) ;
6565 }
66- const { posts} = await getPosts ( id , token ) ;
66+ const { posts } = await getPosts ( id , token ) ;
6767 return < PostsForumPage posts = { posts } initalPost = { selectPost } /> ;
68- }
68+ }
0 commit comments