From 33a06b18377e352d64e26ae9efb24d688d67ac9f Mon Sep 17 00:00:00 2001 From: parth gohil Date: Wed, 11 Oct 2023 11:33:37 +0530 Subject: [PATCH] Fix, route type issue for SSR --- stubs/inertia-react-ts/resources/js/ssr.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/inertia-react-ts/resources/js/ssr.tsx b/stubs/inertia-react-ts/resources/js/ssr.tsx index efb433a0f..400f4a061 100644 --- a/stubs/inertia-react-ts/resources/js/ssr.tsx +++ b/stubs/inertia-react-ts/resources/js/ssr.tsx @@ -3,6 +3,7 @@ import { createInertiaApp } from '@inertiajs/react'; import createServer from '@inertiajs/react/server'; import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; import route from '../../vendor/tightenco/ziggy/dist/index.m'; +import { RouteName } from 'ziggy-js'; const appName = import.meta.env.VITE_APP_NAME || 'Laravel'; @@ -13,7 +14,7 @@ createServer((page) => title: (title) => `${title} - ${appName}`, resolve: (name) => resolvePageComponent(`./Pages/${name}.tsx`, import.meta.glob('./Pages/**/*.tsx')), setup: ({ App, props }) => { - global.route = (name, params, absolute) => + global.route = (name, params, absolute) => route(name, params, absolute, { // @ts-expect-error ...page.props.ziggy,