/* eslint-disable no-unused-vars */ import React, { useEffect, useContext } from 'react'; import Onyx from '../../templates/onyx'; import LeftSidebar from '../LeftSidebar/LeftSidebar'; import RightSidebar from '../RightSidebar/RightSidebar'; import AppContext from '../../context/AppContext'; import Pikachu from '../../templates/pikachu/Pikachu'; const App = () => { const context = useContext(AppContext); const { state, dispatch } = context; const { theme } = state; useEffect(() => { const storedState = JSON.parse(localStorage.getItem('state')); dispatch({ type: 'import_data', payload: storedState }); }, [dispatch]); const renderTemplate = () => { switch (theme.layout) { case 'Onyx': return ; case 'Pikachu': return ; default: return null; } }; return (
{renderTemplate()}
); }; export default App;