help with importing component
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
i set up the supabase auth next js project and now im following a video that sets up a chat application, while creating the logout im struggling on this
Cannot update a component (`Router`) while rendering a different component (`default`). To locate the bad setState() call inside `default`, follow the stack trace as described in https://react.dev/link/setstate-in-render Error Component Stack
import React from "react";
import ChatHeader from "@/components/ChatHeader";
import { createClient } from "@/utils/supabase/server";
export default async function LivePage() {
const supabase = await createClient();
const {
data: { user },
} = await supabase.auth.getUser();
return (
<div className="max-w-3xl mx-auto h-screen py-10">
<div className="h-full border rounded-md">
<ChatHeader />
</div>
</div>
);
}