Introduce "useAppTitle" hook
This commit is contained in:
@@ -23,13 +23,15 @@ import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
|
||||
import { useNavBarContext } from '@/modules/navigation-bar/contexts/NavbarContext.tsx';
|
||||
import { MetadataHistorySettings } from '@/modules/history/History.types.ts';
|
||||
import { useAppTitle } from '@/modules/navigation-bar/hooks/useAppTitle.ts';
|
||||
|
||||
export const HistorySettings = () => {
|
||||
const { t } = useTranslation();
|
||||
const { setTitle, setAction } = useNavBarContext();
|
||||
const { setAction } = useNavBarContext();
|
||||
|
||||
useAppTitle(t('history.title'));
|
||||
|
||||
useLayoutEffect(() => {
|
||||
setTitle(t('history.title'));
|
||||
setAction(null);
|
||||
}, [t]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user