From 36800a944e715b9e630420defc9e2d9f75a3844e Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Wed, 25 Mar 2020 11:39:33 +0530 Subject: [PATCH] styling, formatting, validation --- src/components/LeftSidebar/LeftSidebar.js | 2 +- src/components/LeftSidebar/tabs/Awards.js | 14 +++- .../LeftSidebar/tabs/Certifications.js | 15 +++- src/components/LeftSidebar/tabs/Education.js | 22 +++++- src/components/LeftSidebar/tabs/Extras.js | 13 +++- src/components/LeftSidebar/tabs/Objective.js | 3 +- src/components/LeftSidebar/tabs/Profile.js | 20 ++--- src/components/LeftSidebar/tabs/Skills.js | 11 ++- src/components/LeftSidebar/tabs/Work.js | 21 +++++- src/index.css | 13 ++-- src/shared/TabBar.js | 73 +++++++++++++------ 11 files changed, 143 insertions(+), 64 deletions(-) diff --git a/src/components/LeftSidebar/LeftSidebar.js b/src/components/LeftSidebar/LeftSidebar.js index c62f7889..890e0e48 100644 --- a/src/components/LeftSidebar/LeftSidebar.js +++ b/src/components/LeftSidebar/LeftSidebar.js @@ -27,7 +27,7 @@ const LeftSidebar = () => { const { state, dispatch } = context; const { data } = state; - const [currentTab, setCurrentTab] = useState('Objective'); + const [currentTab, setCurrentTab] = useState('Profile'); const onChange = (key, value) => { dispatch({ type: 'on_input', diff --git a/src/components/LeftSidebar/tabs/Awards.js b/src/components/LeftSidebar/tabs/Awards.js index d75ef5b5..e734aee4 100644 --- a/src/components/LeftSidebar/tabs/Awards.js +++ b/src/components/LeftSidebar/tabs/Awards.js @@ -12,7 +12,7 @@ const AwardsTab = ({ data, onChange }) => { return ( <> -
+
{ const onChange = (key, value) => setItem(set({ ...item }, key, value)); const addItem = () => { + if (item.title === '') return; + dispatch({ type: 'add_item', payload: { @@ -75,7 +77,7 @@ const AddItem = ({ dispatch }) => { }; return ( -
+
setOpen(!isOpen)} @@ -87,6 +89,7 @@ const AddItem = ({ dispatch }) => {
onChange('title', v)} @@ -94,6 +97,7 @@ const AddItem = ({ dispatch }) => { onChange('subtitle', v)} @@ -102,7 +106,7 @@ const AddItem = ({ dispatch }) => {