- vm_api.py: pure FastAPI JSON API on :8098 with CORS - vm-api.service: systemd unit for API (replaces inline HTML vm_web.py for frontend) - vm_web.py: kept intact as fallback; Apache now proxies /api/ -> :8098 - frontend/: Vite + React + TanStack Query scaffold - Apache vhost updated: DocumentRoot -> frontend/dist, /api/ proxy, SPA fallback - All original HTML pages still functional via :8099 during transition
22 lines
829 B
JavaScript
22 lines
829 B
JavaScript
import { useRouter } from "./useRouter.js";
|
|
import { getElementScrollRestorationEntry, setupScrollRestoration } from "@tanstack/router-core";
|
|
//#region src/ScrollRestoration.tsx
|
|
function useScrollRestoration() {
|
|
setupScrollRestoration(useRouter(), true);
|
|
}
|
|
/**
|
|
* @deprecated Use the `scrollRestoration` router option instead.
|
|
*/
|
|
function ScrollRestoration(_props) {
|
|
useScrollRestoration();
|
|
if (process.env.NODE_ENV === "development") console.warn("The ScrollRestoration component is deprecated. Use createRouter's `scrollRestoration` option instead.");
|
|
return null;
|
|
}
|
|
function useElementScrollRestoration(options) {
|
|
useScrollRestoration();
|
|
return getElementScrollRestorationEntry(useRouter(), options);
|
|
}
|
|
//#endregion
|
|
export { ScrollRestoration, useElementScrollRestoration };
|
|
|
|
//# sourceMappingURL=ScrollRestoration.js.map
|