mirror of
https://github.com/docmost/docmost.git
synced 2025-11-15 19:41:11 +10:00
feat: remember and restore previous route when exiting settings (#1046)
Improves user experience by allowing users to return to the previous page after visiting the Settings section. Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
This commit is contained in:
@ -30,10 +30,12 @@ import SharedPage from "@/pages/share/shared-page.tsx";
|
||||
import Shares from "@/pages/settings/shares/shares.tsx";
|
||||
import ShareLayout from "@/features/share/components/share-layout.tsx";
|
||||
import ShareRedirect from '@/pages/share/share-redirect.tsx';
|
||||
import { useTrackOrigin } from "@/hooks/use-track-origin";
|
||||
|
||||
export default function App() {
|
||||
const { t } = useTranslation();
|
||||
useRedirectToCloudSelect();
|
||||
useTrackOrigin();
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -59,7 +61,7 @@ export default function App() {
|
||||
<Route path={"/share/:shareId/p/:pageSlug"} element={<SharedPage />} />
|
||||
<Route path={"/share/p/:pageSlug"} element={<SharedPage />} />
|
||||
</Route>
|
||||
|
||||
|
||||
<Route path={"/share/:shareId"} element={<ShareRedirect />} />
|
||||
<Route path={"/p/:pageSlug"} element={<PageRedirect />} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user