completed project, base structure to create more templates

This commit is contained in:
Amruth Pillai
2020-03-25 16:38:36 +05:30
parent d5dcd38edb
commit 7bec7b5d49
7 changed files with 54 additions and 20 deletions

View File

@ -1,20 +1,20 @@
/* eslint-disable no-unused-vars */
import React from 'react';
import { toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import React, { useEffect, useContext } from 'react';
import Onyx from '../../templates/onyx';
import LeftSidebar from '../LeftSidebar/LeftSidebar';
import RightSidebar from '../RightSidebar/RightSidebar';
toast.configure({
autoClose: 3000,
closeButton: false,
hideProgressBar: true,
position: toast.POSITION.BOTTOM_RIGHT,
});
import AppContext from '../../context/AppContext';
const App = () => {
const context = useContext(AppContext);
const { dispatch } = context;
useEffect(() => {
const state = JSON.parse(localStorage.getItem('state'));
dispatch({ type: 'import_data', payload: state });
}, [dispatch]);
return (
<div className="h-screen overflow-hidden grid grid-cols-5 items-center">
<LeftSidebar />