mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 08:36:44 +00:00
Corrigiu todos os roteamentos
X-Lovable-Edit-ID: edt-8c119a00-7f52-40cf-8fc7-d2bc0ae978fc Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
commit
dc0861e561
1 changed files with 8 additions and 2 deletions
|
|
@ -91,11 +91,12 @@ function AgentDetailPage() {
|
|||
},
|
||||
});
|
||||
|
||||
const { data: agent, isLoading: agentLoading } = useQuery({
|
||||
const { data: agent, isLoading: agentLoading, error: agentError } = useQuery({
|
||||
queryKey: ["agent-detail", id],
|
||||
enabled: !!isAdmin,
|
||||
refetchInterval: 10_000,
|
||||
queryFn: async () => {
|
||||
console.log("[admin.agente] fetching agent detail", { id });
|
||||
const { data, error } = await supabase
|
||||
.from("agent_instances")
|
||||
.select(
|
||||
|
|
@ -231,7 +232,12 @@ function AgentDetailPage() {
|
|||
}
|
||||
}, [roleLoading, isAdmin, navigate]);
|
||||
|
||||
if (authLoading || roleLoading || agentLoading) {
|
||||
console.log("[admin.agente] render", {
|
||||
id, authLoading, roleLoading, agentLoading,
|
||||
isAdmin, hasUser: !!user, hasAgent: !!agent, agentError,
|
||||
});
|
||||
|
||||
if (authLoading || roleLoading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-background">
|
||||
<Loader2 className="h-6 w-6 animate-spin text-primary" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue