refactor: normalize view models and share breadcrumbs and titles (WealthLedger/frontend#143) (#153)
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 11s
Frontend verify / verify (push) Failing after 8m19s

This commit was merged in pull request #153.
This commit is contained in:
2026-11-04 21:14:29 +03:00
parent 2d070ce2b5
commit 2db39f25d9
30 changed files with 194 additions and 202 deletions
+1
View File
@@ -11,3 +11,4 @@ export {
type ReadRetryProps,
} from "./ReadRetry/ReadRetry";
export { SourceSyncStatus } from "./SourceSyncStatus/SourceSyncStatus";
export { useAppDocumentTitle } from "./useAppDocumentTitle";
+13
View File
@@ -0,0 +1,13 @@
import { useDocumentTitle } from "@mantine/hooks";
import { useTranslation } from "react-i18next";
/**
* Sets `document.title` to `<title> — <appName>`.
* Owner of the "page title + app name suffix" formatting rule.
*/
function useAppDocumentTitle(title: string) {
const { t } = useTranslation();
useDocumentTitle(`${title} — ${t("appName")}`);
}
export { useAppDocumentTitle };