feat: demo page realisation

This commit is contained in:
2026-04-24 13:17:27 +03:00
parent b42802aac0
commit d67df0c2e1
167 changed files with 18271 additions and 65 deletions

View File

@@ -33,11 +33,18 @@ import {
StationEditPage,
RouteCreatePage,
RoutePreview,
DemoPage,
RouteEditPage,
ArticlePreviewPage,
CountryAddPage,
} from "@pages";
import { authStore, createSightStore, editSightStore, ROUTE_REQUIRED_RESOURCES } from "@shared";
import {
authStore,
createSightStore,
editSightStore,
languageStore,
ROUTE_REQUIRED_RESOURCES,
} from "@shared";
import { Layout } from "@widgets";
import { runInAction } from "mobx";
import React, { useEffect } from "react";
@@ -102,6 +109,14 @@ const ClearStoresWrapper: React.FC<{ children: React.ReactNode }> = ({
runInAction(() => {
editSightStore.hasLoadedCommon = false;
});
if (
location.pathname.includes("create") ||
location.pathname.includes("edit") ||
location.pathname.includes("add")
) {
languageStore.setLanguage("ru");
}
}, [location]);
return <>{children}</>;
@@ -120,6 +135,10 @@ const router = createBrowserRouter([
path: "route-preview/:id",
element: <RoutePreview />,
},
{
path: "demo/:id",
element: <DemoPage />,
},
{
path: "/",
element: (