mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 07:36:41 +00:00
Changes
Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
parent
aec46d386e
commit
7583dae5ce
2 changed files with 10 additions and 12 deletions
|
|
@ -17,12 +17,12 @@ import { TelegramOnboardingWizard } from "@/components/mika/telegram/TelegramOnb
|
|||
import { toast } from "sonner";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const dashboardSearchSchema = z.object({
|
||||
status: fallback(z.string().optional(), undefined),
|
||||
});
|
||||
type DashboardSearch = { status?: string };
|
||||
|
||||
export const Route = createFileRoute("/painel/")({
|
||||
validateSearch: zodValidator(dashboardSearchSchema),
|
||||
validateSearch: (search: Record<string, unknown>): DashboardSearch => ({
|
||||
status: typeof search.status === "string" ? search.status : undefined,
|
||||
}),
|
||||
component: DashboardPage,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
||||
import { zodValidator, fallback } from "@tanstack/zod-adapter";
|
||||
import { z } from "zod";
|
||||
import { Plug } from "lucide-react";
|
||||
import { useEffect } from "react";
|
||||
import { toast } from "sonner";
|
||||
|
|
@ -11,14 +9,14 @@ import { useIntegrationCards } from "@/hooks/use-integrations";
|
|||
import { useAgentInstance } from "@/hooks/use-agent-instance";
|
||||
import { IntegrationCard } from "@/components/mika/integrations/IntegrationCard";
|
||||
|
||||
const integracoesSearchSchema = z.object({
|
||||
status: fallback(z.string().optional(), undefined),
|
||||
error: fallback(z.string().optional(), undefined),
|
||||
mcp: fallback(z.string().optional(), undefined),
|
||||
});
|
||||
type IntegracoesSearch = { status?: string; error?: string; mcp?: string };
|
||||
|
||||
export const Route = createFileRoute("/painel/integracoes/")({
|
||||
validateSearch: zodValidator(integracoesSearchSchema),
|
||||
validateSearch: (search: Record<string, unknown>): IntegracoesSearch => ({
|
||||
status: typeof search.status === "string" ? search.status : undefined,
|
||||
error: typeof search.error === "string" ? search.error : undefined,
|
||||
mcp: typeof search.mcp === "string" ? search.mcp : undefined,
|
||||
}),
|
||||
component: IntegracoesPage,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue