Modified the `useSuperUser` hook to pass the user's email to the `is_super_user` RPC function. This ensures the "Modifier" button is correctly displayed for super admins.
@@ -16,7 +16,9 @@ export function useSuperUser() {
}
try {
- const { data, error } = await supabase.rpc('is_super_user');
+ const { data, error } = await supabase.rpc('is_super_user', {
+ user_email: user.email
+ });
if (error) {
console.error('Error checking super user status:', error);