File tree Expand file tree Collapse file tree 2 files changed +12
-20
lines changed
app/[locale]/(user)/collaboratives Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ const CollaborativesListingClient = () => {
8484 async ( ) => {
8585 console . log ( 'Fetching collaboratives...' ) ;
8686 try {
87- // @ts -ignore - Query has no variables
87+ // @ts -expect-error - Query has no variables
8888 const result = await GraphQLPublic (
8989 PublishedCollaboratives as any ,
9090 { }
@@ -210,15 +210,11 @@ const CollaborativesListingClient = () => {
210210 </ div >
211211 </ div >
212212
213- { /* Loading State */ }
214- { isLoading && (
213+ { isLoading ? (
215214 < div className = "flex justify-center p-10" >
216215 < Loading />
217216 </ div >
218- ) }
219-
220- { /* Error State */ }
221- { error && (
217+ ) :error ?(
222218 < div className = "flex flex-col items-center justify-center gap-4 py-10" >
223219 < Text variant = "headingXl" color = "critical" >
224220 Error Loading Collaboratives
@@ -227,7 +223,7 @@ const CollaborativesListingClient = () => {
227223 Failed to load collaboratives. Please try again later.
228224 </ Text >
229225 </ div >
230- ) }
226+ ) : null }
231227
232228 { /* Results Section */ }
233229 { ! isLoading && ! error && (
Original file line number Diff line number Diff line change @@ -212,18 +212,14 @@ const CollaborativeDetailClient = () => {
212212 [ `fetch_CollaborativeDetails_${ params . collaborativeSlug } ` ] ,
213213 async ( ) => {
214214 console . log ( 'Fetching collaborative details for:' , params . collaborativeSlug ) ;
215- try {
216- const result = await GraphQLPublic (
217- CollaborativeDetails as any ,
218- { } ,
219- {
220- slug : params . collaborativeSlug ,
221- }
222- ) as { collaborativeBySlug : TypeCollaborative } ;
223- return result ;
224- } catch ( err ) {
225- throw err ;
226- }
215+ const result = await GraphQLPublic (
216+ CollaborativeDetails as any ,
217+ { } ,
218+ {
219+ slug : params . collaborativeSlug ,
220+ }
221+ ) as { collaborativeBySlug : TypeCollaborative } ;
222+ return result ;
227223 } ,
228224 {
229225 refetchOnMount : true ,
You can’t perform that action at this time.
0 commit comments