import React, { useEffect } from 'react' import LayoutBase from './LayoutBase' import BlogPostArchive from './components/BlogPostArchive' export const LayoutArchive = (props) => { const { archivePosts } = props useEffect(() => { const anchor = window.location.hash if (anchor) { setTimeout(() => { const anchorElement = document.getElementById(anchor.substring(1)) if (anchorElement) { anchorElement.scrollIntoView({ block: 'start', behavior: 'smooth' }) } }, 300) } }, []) return (
{Object.keys(archivePosts).map(archiveTitle => ( ))}
) }