export const getSererSideProps = (context) => {
return withPageAuth({
redirectTo: '/login',
async getServerSideProps(ctx) {
// Run queries with RLS on the server
const { data: rows, error } = await supabase.from('table').select('*').eq('id', context.params.id).single()
return {
props: {
rows
}
}
}
})(context);
}
export const getSererSideProps = (context) => {
return withPageAuth({
redirectTo: '/login',
async getServerSideProps(ctx) {
// Run queries with RLS on the server
const { data: rows, error } = await supabase.from('table').select('*').eq('id', context.params.id).single()
return {
props: {
rows
}
}
}
})(context);
}