fix: reverted custom page title element (#1715)
This commit is contained in:
parent
219e29b947
commit
5e423f4fd3
@ -22,7 +22,14 @@ import { useMemo } from 'react';
|
|||||||
|
|
||||||
const DEFAULT_TITLE = t('Welcome to Vega trading!');
|
const DEFAULT_TITLE = t('Welcome to Vega trading!');
|
||||||
|
|
||||||
const Title = () => {
|
function AppBody({ Component, pageProps }: AppProps) {
|
||||||
|
const { connectDialog, update } = useGlobalStore((store) => ({
|
||||||
|
connectDialog: store.connectDialog,
|
||||||
|
update: store.update,
|
||||||
|
}));
|
||||||
|
const { isOpen, symbol, trigger, setOpen } = useAssetDetailsDialogStore();
|
||||||
|
const [theme, toggleTheme] = useThemeSwitcher();
|
||||||
|
|
||||||
const { pageTitle } = useGlobalStore((store) => ({
|
const { pageTitle } = useGlobalStore((store) => ({
|
||||||
pageTitle: store.pageTitle,
|
pageTitle: store.pageTitle,
|
||||||
}));
|
}));
|
||||||
@ -35,21 +42,11 @@ const Title = () => {
|
|||||||
if (networkName) return `${pageTitle} [${networkName}]`;
|
if (networkName) return `${pageTitle} [${networkName}]`;
|
||||||
return pageTitle;
|
return pageTitle;
|
||||||
}, [pageTitle, networkName]);
|
}, [pageTitle, networkName]);
|
||||||
return <title>{title}</title>;
|
|
||||||
};
|
|
||||||
|
|
||||||
function AppBody({ Component, pageProps }: AppProps) {
|
|
||||||
const { connectDialog, update } = useGlobalStore((store) => ({
|
|
||||||
connectDialog: store.connectDialog,
|
|
||||||
update: store.update,
|
|
||||||
}));
|
|
||||||
const { isOpen, symbol, trigger, setOpen } = useAssetDetailsDialogStore();
|
|
||||||
const [theme, toggleTheme] = useThemeSwitcher();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeContext.Provider value={theme}>
|
<ThemeContext.Provider value={theme}>
|
||||||
<Head>
|
<Head>
|
||||||
<Title />
|
<title>{title}</title>
|
||||||
</Head>
|
</Head>
|
||||||
<div className="h-full relative dark:bg-black dark:text-white z-0 grid grid-rows-[min-content,1fr,min-content]">
|
<div className="h-full relative dark:bg-black dark:text-white z-0 grid grid-rows-[min-content,1fr,min-content]">
|
||||||
<AppLoader>
|
<AppLoader>
|
||||||
|
Loading…
Reference in New Issue
Block a user