Merge branch 'develop' of https://codeberg.org/mkljczk/pl-fe into develop
Some checks failed
pl-api CI / Test for pl-api formatting (22.x) (push) Has been cancelled
pl-fe CI / Test and upload artifacts (22.x) (push) Has been cancelled
pl-hooks CI / Test for a successful build (22.x) (push) Has been cancelled
pl-fe CI / deploy (push) Has been cancelled

This commit is contained in:
2026-01-22 23:22:01 +00:00
20 changed files with 293 additions and 96 deletions

View File

@@ -1436,6 +1436,13 @@ const router = createRouter({
pathParamsAllowedCharacters: ['@'],
});
router.subscribe('onBeforeNavigate', (event) => {
if (!event.fromLocation || event.hashChanged || event.hrefChanged || event.pathChanged) return;
if (event.fromLocation.state.modalIndex === event.toLocation.state.modalIndex) {
window.scrollTo(0, 0);
}
});
declare module '@tanstack/react-router' {
interface Register {
router: typeof router;