let { data, error, status } = await supabase
.from("profiles")
.select(`username`)
.eq("id", id)
.single();
if (error && status !== 406) {
throw error;
}
if (data?.username) {
router.push({ pathname: "/[account]", query: { account: id } });
return;
}
let { data, error, status } = await supabase
.from("profiles")
.select(`username`)
.eq("id", id)
.single();
if (error && status !== 406) {
throw error;
}
if (data?.username) {
router.push({ pathname: "/[account]", query: { account: id } });
return;
}