From 965b1be225bca4516bac2ae544e1d4304ea099a3 Mon Sep 17 00:00:00 2001 From: Andreas Tzionis Date: Sat, 30 Mar 2024 01:44:32 +0200 Subject: [PATCH] fixed non home pages --- lib/client/vanilla/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/client/vanilla/index.tsx b/lib/client/vanilla/index.tsx index db675cbc..246a463b 100644 --- a/lib/client/vanilla/index.tsx +++ b/lib/client/vanilla/index.tsx @@ -20,7 +20,8 @@ const ContentProvider: React.FC = ({ data, standaloneS useEffect(() => { if (data) { - const _templateData = data?.find(({ name }: dataType) => name === location.pathname) + const url = location.pathname === '/' ? '/' : `${location.pathname}.html` + const _templateData = data?.find(({ name }: dataType) => name === url) setTemplateData(_templateData.content) } }, [])