Fix profile query: select phone/address instead of email from companies
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ export function AuthProvider({ children }) {
|
|||||||
const fetchProfile = async (authUser) => {
|
const fetchProfile = async (authUser) => {
|
||||||
const { data } = await supabase
|
const { data } = await supabase
|
||||||
.from('profiles')
|
.from('profiles')
|
||||||
.select('*, company:companies(id, name, email)')
|
.select('*, company:companies(id, name, phone, address)')
|
||||||
.eq('id', authUser.id)
|
.eq('id', authUser.id)
|
||||||
.single();
|
.single();
|
||||||
if (data) setCurrentUser({ ...data, email: authUser.email });
|
if (data) setCurrentUser({ ...data, email: authUser.email });
|
||||||
|
|||||||
Reference in New Issue
Block a user