We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying to get the user role from superbase and store it in composable. I'm Getting error " [nuxt] [useState] key must be a string:"
Any help would be highly appreciated. Below is the code in composable.
export const useUserRole = function () { const user = useSupabaseUser() const email = user.value.email const client = useSupabaseClient() const [role, setRole] = useState('') const fetchUserRole = async () => { const { data, error } = await client .from('people') .select('role') .eq('email', email) .single() if (error) { console.error(error) return } if (data) { setRole(data.role) } } onMounted(fetchUserRole) return role }
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Sorry, something went wrong.
This issue was closed because it has been stalled for 30 days with no activity.
No branches or pull requests
Hi,
I'm trying to get the user role from superbase and store it in composable.
I'm Getting error " [nuxt] [useState] key must be a string:"
Any help would be highly appreciated.
Below is the code in composable.
The text was updated successfully, but these errors were encountered: