refactor: normalize view models and share breadcrumbs and titles (WealthLedger/frontend#143) (#153)
This commit was merged in pull request #153.
This commit is contained in:
@@ -11,3 +11,4 @@ export {
|
||||
type ReadRetryProps,
|
||||
} from "./ReadRetry/ReadRetry";
|
||||
export { SourceSyncStatus } from "./SourceSyncStatus/SourceSyncStatus";
|
||||
export { useAppDocumentTitle } from "./useAppDocumentTitle";
|
||||
|
||||
@@ -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 };
|
||||
Reference in New Issue
Block a user