Fix getting No data from database.
export const supabase = createClient("https://krppyyichhwmuvastgik.supabase.co", "THEN MY KEY FROM SETTINGS --> API")
///Then the reference:
useEffect(() => {
const data = supabase
.from("profiles")
.select("*")
console.log(data)
}, []);export const supabase = createClient("https://krppyyichhwmuvastgik.supabase.co", "THEN MY KEY FROM SETTINGS --> API")
///Then the reference:
useEffect(() => {
const data = supabase
.from("profiles")
.select("*")
console.log(data)
}, []);It returns:
{
"shouldThrowOnError": false,
"allowEmpty": false,
"url": "https://krppyyichhwmuvastgik.supabase.co/rest/v1/profiles?select=*",
"headers": {
"X-Client-Info": "supabase-js/1.35.7",
"apikey": "MY KEY",
"Authorization": "Bearer MY KEY"
},
"schema": "public",
"_subscription": null,
"_realtime": {
"accessToken": null,
"channels": [],
"endPoint": "wss://krppyyichhwmuvastgik.supabase.co/realtime/v1/websocket",
"headers": {
"X-Client-Info": "supabase-js/1.35.7"
},
"params": {
"apikey": "MY KEY"
},
"timeout": 10000,
"heartbeatIntervalMs": 30000,
"longpollerTimeout": 20000,
"pendingHeartbeatRef": null,
"ref": 0,
"conn": null,
"sendBuffer": [],
"serializer": {
"HEADER_LENGTH": 1
},
"stateChangeCallbacks": {
"open": [],
"close": [],
"error": [],
"message": []
},
"reconnectTimer": {
"tries": 0
}
},
"_headers": {
"X-Client-Info": "supabase-js/1.35.7",
"apikey": "MY KEY",
"Authorization": "Bearer MY KEY"
},
"_schema": "public",
"_table": "profiles",
"method": "GET"
}{
"shouldThrowOnError": false,
"allowEmpty": false,
"url": "https://krppyyichhwmuvastgik.supabase.co/rest/v1/profiles?select=*",
"headers": {
"X-Client-Info": "supabase-js/1.35.7",
"apikey": "MY KEY",
"Authorization": "Bearer MY KEY"
},
"schema": "public",
"_subscription": null,
"_realtime": {
"accessToken": null,
"channels": [],
"endPoint": "wss://krppyyichhwmuvastgik.supabase.co/realtime/v1/websocket",
"headers": {
"X-Client-Info": "supabase-js/1.35.7"
},
"params": {
"apikey": "MY KEY"
},
"timeout": 10000,
"heartbeatIntervalMs": 30000,
"longpollerTimeout": 20000,
"pendingHeartbeatRef": null,
"ref": 0,
"conn": null,
"sendBuffer": [],
"serializer": {
"HEADER_LENGTH": 1
},
"stateChangeCallbacks": {
"open": [],
"close": [],
"error": [],
"message": []
},
"reconnectTimer": {
"tries": 0
}
},
"_headers": {
"X-Client-Info": "supabase-js/1.35.7",
"apikey": "MY KEY",
"Authorization": "Bearer MY KEY"
},
"_schema": "public",
"_table": "profiles",
"method": "GET"
}But I want to get database data. DB named "profiles". Could you please help me guys? Btw I turned off the RLS.