Merge pull request #1267 from automatisch/AUT-276

feat(user-interface): add title field
This commit is contained in:
Ali BARIN
2023-09-08 21:04:58 +02:00
committed by GitHub
4 changed files with 36 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
import * as React from 'react';
import useConfig from 'hooks/useConfig';
type MetadataProviderProps = {
children: React.ReactNode;
};
const MetadataProvider = ({
children,
}: MetadataProviderProps): React.ReactElement => {
const { config } = useConfig();
React.useEffect(() => {
document.title = (config?.title as string) || 'Automatisch';
}, [config?.title]);
return <>{children}</>;
};
export default MetadataProvider;