diff --git a/src/containers/About/index.js b/src/containers/About/index.js index f13a52f..f4c4de0 100644 --- a/src/containers/About/index.js +++ b/src/containers/About/index.js @@ -12,7 +12,7 @@ const About = () => { useEffect(() => { firestoreDB.collection("about-info").onSnapshot(snapshot => { - snapshot.docs.map(doc => setAboutStore(doc.data())); + setAboutStore(snapshot.docs.map(doc => doc.data())[0]); }); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -35,20 +35,19 @@ const About = () => { - {aboutStore.future_goals && - aboutStore.future_goals.goals_array.map((_goal, index) => { - return ( + {aboutStore?.future_goals?.length && aboutStore.future_goals.map((_goal, index) => { + return ( + style={{ fontWeight: "bold" }}> {_goal.goal_title} {_goal.goal_description} - ) - })} + ) + })} diff --git a/src/containers/Home/index.js b/src/containers/Home/index.js index 598f7c7..6f47952 100644 --- a/src/containers/Home/index.js +++ b/src/containers/Home/index.js @@ -37,7 +37,7 @@ const Home = (props) => { - {`Hello! I am Narottam and I am a Team Lead working on web applications and web infrastructure. I have been working professionally for ${calcYearsOfExperience( + {`Hello! I am Narottam and I am a Tech Lead working on web applications and web infrastructure. I have been working professionally for ${calcYearsOfExperience( workExperience)} years but tinkering since a kid.`}

@@ -62,7 +62,7 @@ const Home = (props) => { {workExperience.length > 0 && - workExperience.reverse().map((_workExperience, index) => { + workExperience.map((_workExperience, index) => { return (
@@ -113,7 +113,7 @@ const Home = (props) => { { skill.skills_array.map((_skill, index) => { return ( - +
{_skill.skill_name}
) }) } diff --git a/src/containers/Home/styles.js b/src/containers/Home/styles.js index 170aa4d..cd2d45b 100644 --- a/src/containers/Home/styles.js +++ b/src/containers/Home/styles.js @@ -36,6 +36,15 @@ const homeStyles = makeStyles(theme => ({ }, marginTop: 15, marginBottom: 20 + }, + skillsPill: { + backgroundColor: 'red', + borderRadius: 10, + paddingRight: theme.spacing(2), + paddingLeft: theme.spacing(2), + paddingTop: 2, + paddingBottom: 2, + textAlign: 'center', } })); diff --git a/src/context/RootContext.js b/src/context/RootContext.js index e500be1..794d271 100644 --- a/src/context/RootContext.js +++ b/src/context/RootContext.js @@ -6,10 +6,16 @@ export const RootContextProvider = props => { const [rootStore, setRootStore] = useState({ drawerOpen: false, theme: "dark" }); useEffect(() => { - async function fetchIpInfo () { - const ipInfo = await fetch("https://ipapi.co/json/"); - let ipInfoResponseJson = await ipInfo.json(); - setRootStore({ ...rootStore, ipInfo: ipInfoResponseJson }); + function fetchIpInfo () { + fetch("https://ipapi.co/json/").then(response => { + if (response.ok) { + let ipInfoResponseJson = response.json(); + setRootStore({ ...rootStore, ipInfo: ipInfoResponseJson }); + } + }).catch(error => { + console.log(error); + setRootStore({ ...rootStore, ipInfo: {} }); + }) } fetchIpInfo(); diff --git a/src/utils/FirebaseConfig.js b/src/utils/FirebaseConfig.js index a95da90..5766dca 100644 --- a/src/utils/FirebaseConfig.js +++ b/src/utils/FirebaseConfig.js @@ -1,14 +1,14 @@ import firebase from "firebase"; const firebaseConfig = firebase.initializeApp({ - apiKey : "AIzaSyBNW35sc1XW4jz8km47M9R4n9hScEO-kvo", - authDomain : "narottam-portfolio.firebaseapp.com", - databaseURL : "https://narottam-portfolio.firebaseio.com", - projectId : "narottam-portfolio", - storageBucket : "narottam-portfolio.appspot.com", - messagingSenderId: "387012073941", - appId : "1:387012073941:web:a125957edf7307c366855c", - measurementId : "G-V3E6ZHHZVF", + databaseURL : "https://portfolio.firebaseio.com", + apiKey: "AIzaSyC3T0ZI9CDOi7GSnMW0vXkbwNlHkNFD4pQ", + authDomain: "portfolio-d5658.firebaseapp.com", + projectId: "portfolio-d5658", + storageBucket: "portfolio-d5658.appspot.com", + messagingSenderId: "166302306604", + appId: "1:166302306604:web:f10ff8ac69ab6c226e1c89", + measurementId: "G-HKCF6Q51Q5" }); const firestoreDB = firebaseConfig.firestore();