mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 17:16:49 +00:00
Changes
Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
parent
cb18639085
commit
04b34f9217
1 changed files with 2 additions and 2 deletions
|
|
@ -80,7 +80,7 @@ function AgentDetailPage() {
|
|||
|
||||
const { data: isAdmin, isLoading: roleLoading } = useQuery({
|
||||
queryKey: ["is-admin", user?.id],
|
||||
enabled: !!user,
|
||||
enabled: !authLoading && !!user,
|
||||
queryFn: async () => {
|
||||
const { data, error } = await supabase.rpc("has_role", {
|
||||
_user_id: user!.id,
|
||||
|
|
@ -93,7 +93,7 @@ function AgentDetailPage() {
|
|||
|
||||
const { data: agent, isLoading: agentLoading, error: agentError } = useQuery({
|
||||
queryKey: ["agent-detail", id],
|
||||
enabled: !!isAdmin,
|
||||
enabled: !authLoading && !!user && isAdmin === true,
|
||||
refetchInterval: 10_000,
|
||||
queryFn: async () => {
|
||||
console.log("[admin.agente] fetching agent detail", { id });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue