import { useMemo } from 'react'; import { useAppSelector } from '@/store/hooks'; import { PageProps } from '@/utils/template'; import { getSectionById } from '../sectionMap'; import styles from './Pikachu.module.scss'; import { MastheadMain, MastheadSidebar } from './widgets/Masthead'; import Section from './widgets/Section'; const Pikachu: React.FC = ({ page }) => { const isFirstPage = useMemo(() => page === 0, [page]); const layout: string[][] = useAppSelector((state) => state.resume.metadata.layout[page]); return (
{isFirstPage && } {layout[1].map((key) => getSectionById(key, Section))}
{isFirstPage && } {layout[0].map((key) => getSectionById(key, Section))}
); }; export default Pikachu;