feat: resolving some bugs

This commit is contained in:
=
2025-01-06 14:56:50 +05:30
parent 808a901aee
commit 0ac7ec460b
17 changed files with 87 additions and 33 deletions
@@ -1,14 +1,17 @@
import { createFileRoute } from "@tanstack/react-router";
import { createFileRoute, stripSearchParams } from "@tanstack/react-router";
import { zodValidator } from "@tanstack/zod-adapter";
import { z } from "zod";
import { ViewSharedSecretByIDPage } from "./ViewSharedSecretByIDPage";
const SharedSecretByIDPageQuerySchema = z.object({
key: z.string()
key: z.string().catch("")
});
export const Route = createFileRoute("/shared/secret/$secretId")({
component: ViewSharedSecretByIDPage,
validateSearch: zodValidator(SharedSecretByIDPageQuerySchema)
validateSearch: zodValidator(SharedSecretByIDPageQuerySchema),
search: {
middlewares: [stripSearchParams({ key: "" })]
}
});