Skip to content

Commit

Permalink
fixed non home pages
Browse files Browse the repository at this point in the history
  • Loading branch information
LiveDuo committed Mar 29, 2024
1 parent ae136d8 commit 965b1be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/client/vanilla/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const ContentProvider: React.FC<ContentProviderBaseProps> = ({ 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)
}
}, [])
Expand Down

0 comments on commit 965b1be

Please sign in to comment.