ERROR IN FETHCING DATA SUPABASE
Unanswered
Romanian Raven Shepherd Dog posted this in #help-forum
Romanian Raven Shepherd DogOP
interface AssetInterface {
title : string,
thumbnail : string,
category : string,
coverImages? : []
}
export const getServerSideProps = (async () => {
const res = await supabase.from('unityAssets').select('*');
// Pass data to the page via props
return { props: { res } }
}) satisfies GetServerSideProps<{ res: AssetInterface }>
Type '() => Promise<{ props: { res: PostgrestSingleResponse<any[]>; }; }>' does not satisfy the expected type 'GetServerSideProps<{ res: AssetInterface; }>'.
title : string,
thumbnail : string,
category : string,
coverImages? : []
}
export const getServerSideProps = (async () => {
const res = await supabase.from('unityAssets').select('*');
// Pass data to the page via props
return { props: { res } }
}) satisfies GetServerSideProps<{ res: AssetInterface }>
Type '() => Promise<{ props: { res: PostgrestSingleResponse<any[]>; }; }>' does not satisfy the expected type 'GetServerSideProps<{ res: AssetInterface; }>'.