mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 09:16:46 +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],
|
queryKey: ["agent-detail", id],
|
||||||
enabled: !!isAdmin,
|
enabled: !!isAdmin,
|
||||||
refetchInterval: 10_000,
|
refetchInterval: 10_000,
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
|
console.log("[admin.agente] fetching agent detail", { id });
|
||||||
const { data, error } = await supabase
|
const { data, error } = await supabase
|
||||||
.from("agent_instances")
|
.from("agent_instances")
|
||||||
.select(
|
.select(
|
||||||
|
|
@ -231,7 +232,12 @@ function AgentDetailPage() {
|
||||||
}
|
}
|
||||||
}, [roleLoading, isAdmin, navigate]);
|
}, [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 (
|
return (
|
||||||
<div className="min-h-screen flex items-center justify-center bg-background">
|
<div className="min-h-screen flex items-center justify-center bg-background">
|
||||||
<Loader2 className="h-6 w-6 animate-spin text-primary" />
|
<Loader2 className="h-6 w-6 animate-spin text-primary" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue