Skip to content
Snippets Groups Projects
Commit 0d26587c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

set title to project.name

parent f0fca3eb
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!190Resolve "[MIN-325] page title is missing"
Pipeline #89398 passed
import { AppWrapper } from '@/components/AppWrapper'; import { AppWrapper } from '@/components/AppWrapper';
import type { AppProps } from 'next/app'; import type { AppProps } from 'next/app';
import '@/styles/index.css'; import '@/styles/index.css';
import { useEffect } from 'react';
import { store } from '@/redux/store';
const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => ( const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => {
<AppWrapper> const project = store.getState().project.data;
<Component {...pageProps} />
</AppWrapper> let title = '';
); if (project) {
title = project.name;
}
useEffect(() => {
document.title = title;
}, [title]);
return (
<AppWrapper>
<Component {...pageProps} />
</AppWrapper>
);
};
export default MyApp; export default MyApp;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment