evikit 2.7.2 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -96,14 +96,19 @@ export function Router({ children, dehydratedState, i18n }) {
|
|
|
96
96
|
* @param {{ lang?: string, url: string }} data
|
|
97
97
|
*/
|
|
98
98
|
export async function ssr(App, data) {
|
|
99
|
-
const origin = process.env["ORIGIN"] || "http://localhost:5173";
|
|
100
99
|
const i18n = await getI18n(...(data.lang ? [data.lang] : []));
|
|
101
100
|
|
|
102
101
|
const queryClient = new QueryClient({
|
|
103
102
|
defaultOptions: { queries: { staleTime: 0 } },
|
|
104
103
|
});
|
|
105
104
|
await queryClient.prefetchQuery(
|
|
106
|
-
queryApi({
|
|
105
|
+
queryApi({
|
|
106
|
+
lang: i18n.getLocale(),
|
|
107
|
+
origin:
|
|
108
|
+
process.env["ORIGIN"] ||
|
|
109
|
+
`http://localhost:${Number(process.env["PORT"]) || 5173}`,
|
|
110
|
+
path: data.url,
|
|
111
|
+
}),
|
|
107
112
|
);
|
|
108
113
|
const dehydratedState = dehydrate(queryClient, {
|
|
109
114
|
shouldRedactErrors: (error) => {
|