route-without-auth.tsx 533 B

1234567891011121314151617
  1. import { DashboardRouteDefinition } from '@/vdb/framework/extension-api/types';
  2. import { z } from 'zod';
  3. const schema = z.object({
  4. test: z.string(),
  5. test2: z.string().optional(),
  6. });
  7. export const routeWithoutAuth: DashboardRouteDefinition = {
  8. component: route => {
  9. const search = route.useSearch();
  10. return <div>Hello from without auth! Test Param from search params: {search.test}</div>;
  11. },
  12. validateSearch: search => schema.parse(search),
  13. path: '/without-auth',
  14. authenticated: false,
  15. };