Server Side Dynamic Page
I need to render a dynamic page on the server side using RLS.
I can make both RLS and params work individually however I can't pass both ctx and { params} to the function without getting an error as below.
When trying
I get the error
This is probably due to my relatively new learning of Javascript but I'm confused why I can pass ctx or { params } one at a time but not both at the same time.
This is the code I'm trying to extend from to use
https://supabase.com/docs/guides/auth/auth-helpers/nextjs#server-side-data-fetching-with-rls
Any help would be much appreciated
I can make both RLS and params work individually however I can't pass both ctx and { params} to the function without getting an error as below.
When trying
export const getServerSideProps = async (ctx, { params }) => { I get the error
Cannot destructure property 'params' of 'undefined' as it is undefinedThis is probably due to my relatively new learning of Javascript but I'm confused why I can pass ctx or { params } one at a time but not both at the same time.
This is the code I'm trying to extend from to use
params.id in the data queryhttps://supabase.com/docs/guides/auth/auth-helpers/nextjs#server-side-data-fetching-with-rls
Any help would be much appreciated
Supabase Documentation
Authentication helpers for Next.js API routes, middleware, and SSR.
