From 7c2eaf5702cfa80716e3861246d32730d4c06128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 20 Oct 2024 13:20:31 +0200 Subject: [PATCH] pl-fe: Do not nest body in PlFeHead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/init/pl-fe-head.tsx | 24 ++++++++---------------- packages/pl-fe/src/init/pl-fe.tsx | 9 ++++----- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/packages/pl-fe/src/init/pl-fe-head.tsx b/packages/pl-fe/src/init/pl-fe-head.tsx index 905c015107..ac32912aa2 100644 --- a/packages/pl-fe/src/init/pl-fe-head.tsx +++ b/packages/pl-fe/src/init/pl-fe-head.tsx @@ -12,12 +12,8 @@ import { generateThemeCss } from 'pl-fe/utils/theme'; const Helmet = React.lazy(() => import('pl-fe/components/helmet')); -interface IPlFeHead { - children: React.ReactNode; -} - /** Injects metadata into site head with Helmet. */ -const PlFeHead: React.FC = ({ children }) => { +const PlFeHead = () => { const { locale, direction } = useLocale(); const { demo, reduceMotion, underlineLinks, demetricator, systemFont } = useSettings(); const plFeConfig = usePlFeConfig(); @@ -43,17 +39,13 @@ const PlFeHead: React.FC = ({ children }) => { }, [dsn]); return ( - <> - - - - {themeCss && } - {['dark', 'black'].includes(theme) && } - - - - {children} - + + + + {themeCss && } + {['dark', 'black'].includes(theme) && } + + ); }; diff --git a/packages/pl-fe/src/init/pl-fe.tsx b/packages/pl-fe/src/init/pl-fe.tsx index 649c7f1dba..6e3f9acd40 100644 --- a/packages/pl-fe/src/init/pl-fe.tsx +++ b/packages/pl-fe/src/init/pl-fe.tsx @@ -30,11 +30,10 @@ const PlFe: React.FC = () => ( - - - - - + + + +