mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-15 01:01:43 +10:00
completed project, base structure to create more templates
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect, useContext } from 'react';
|
||||
import React, { useState, useContext } from 'react';
|
||||
|
||||
import AppContext from '../../context/AppContext';
|
||||
import TabBar from '../../shared/TabBar';
|
||||
@ -28,7 +28,7 @@ const LeftSidebar = () => {
|
||||
const { data } = state;
|
||||
|
||||
const [currentTab, setCurrentTab] = useState('Profile');
|
||||
const onChange = (key, value) =>
|
||||
const onChange = (key, value) => {
|
||||
dispatch({
|
||||
type: 'on_input',
|
||||
payload: {
|
||||
@ -37,10 +37,8 @@ const LeftSidebar = () => {
|
||||
},
|
||||
});
|
||||
|
||||
// TODO: Remove this in production environment
|
||||
useEffect(() => {
|
||||
dispatch({ type: 'populate_starter' });
|
||||
}, [dispatch]);
|
||||
dispatch({ type: 'save_data' });
|
||||
};
|
||||
|
||||
const renderTabs = () => {
|
||||
switch (currentTab) {
|
||||
|
||||
Reference in New Issue
Block a user