diff --git a/src/actions/index.js b/src/actions/index.js index afa02d8..e3bd052 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -71,20 +71,4 @@ export const setIntro = (start=true) => async (dispatch, getState) => { type: 'SET_INTRO', payload: start, }); -} - -export const hideNavigation = () => async (dispatch, getState) => { - - dispatch({ - type: 'SET_NAVIGATION', - payload: false, - }); -} - -export const showNavigation = () => async (dispatch, getState) => { - - dispatch({ - type: 'SET_NAVIGATION', - payload: true, - }); } \ No newline at end of file diff --git a/src/components/Intro.js b/src/components/Intro.js index e392a5a..d3f13c0 100644 --- a/src/components/Intro.js +++ b/src/components/Intro.js @@ -1,7 +1,6 @@ import React from 'react'; import { connect } from 'react-redux'; import './css/Intro.css'; -import {hideNavigation, showNavigation} from '../actions'; import Topic from './subcomponents/Topic'; import { ChevronDoubleUp, ChevronDoubleDown } from 'react-bootstrap-icons'; @@ -108,8 +107,6 @@ class Intro extends React.Component { } else if (input === "down" && this.state.nextLoc >= this.topics.length) { // Set something to happen when you reach the end - this.props.showNavigation(); - localStorage.setItem('intro', true); } }; @@ -123,11 +120,6 @@ class Intro extends React.Component { document.title = "HomePage"; // Set document title - // Hide the navigation - if (!localStorage.getItem('intro')) { - this.props.hideNavigation(); - } - } // Topics to display in intro @@ -178,4 +170,4 @@ const mapStateToProps = (state) => { } -export default connect(mapStateToProps, {hideNavigation, showNavigation})(Intro); +export default connect(mapStateToProps, {})(Intro); diff --git a/src/components/Navigation.js b/src/components/Navigation.js index fd3f365..765e0cf 100644 --- a/src/components/Navigation.js +++ b/src/components/Navigation.js @@ -1,45 +1,36 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import { connect } from 'react-redux'; -import {toggleContactModal} from '../actions' import './css/Navigation.css'; import { HouseDoor, FileEarmarkPerson, Github, Envelope, Book } from 'react-bootstrap-icons'; import ContactModal from './subcomponents/ContactModal'; const Navigation = (props) => { - if (props.enable){ - return ( -