diff --git a/src/components/MainMenu.js b/src/components/MainMenu.js index e0c5d3dd..6f79016d 100644 --- a/src/components/MainMenu.js +++ b/src/components/MainMenu.js @@ -11,30 +11,30 @@ const MainMenu = function ({ translations }) { + size = { `large` }> + className = { `main-nav` } + to = { `/` }> { translations.i_homeNav } + className = { `main-nav` } + to = { `/about` }> { translations.i_aboutNav } { translations.i_githubNav } - + {/**/} {/**/} ); -}; // End MainMenu(<>) +}; // Ends export { MainMenu }; diff --git a/src/components/PageLayout.js b/src/components/PageLayout.js index 57e7a384..3b61bf8a 100644 --- a/src/components/PageLayout.js +++ b/src/components/PageLayout.js @@ -4,23 +4,26 @@ import { Segment, } from 'semantic-ui-react'; -const PageLayout = (props) => { + +const PageLayout = ({ children }) => { return (
+ verticalAlign = { `middle` }> - {props.children} + + { children } + + floated = { `right` } + width = { 6 } /> @@ -28,4 +31,5 @@ const PageLayout = (props) => { ); }; + export { PageLayout }; diff --git a/src/components/StepBar.js b/src/components/StepBar.js index e8940e8c..bfed2c80 100644 --- a/src/components/StepBar.js +++ b/src/components/StepBar.js @@ -3,25 +3,29 @@ import { Step } from 'semantic-ui-react'; import { STEP_VALS } from '../forms/STEP_VALS'; + const StepBar = ({ currentStepKey, goToStep, translations }) => { let cleanSteps = []; STEP_VALS.forEach((step, index) => { let newStep = { title: { content: translations[ `i_` + step.key ] }}; - newStep.active = step.key === currentStepKey; - newStep.onClick = (e) => { - goToStep({ key: step.key }); - }; - newStep.key = index; + + newStep.active = step.key === currentStepKey; + newStep.onClick = function (event) { goToStep({ key: step.key }); }; + newStep.key = index; + cleanSteps[ index ] = newStep; }); - return (); + return ( + + ); }; -export default StepBar; + +export { StepBar }; diff --git a/src/components/Surrounder.js b/src/components/Surrounder.js index addef967..712d49bf 100644 --- a/src/components/Surrounder.js +++ b/src/components/Surrounder.js @@ -6,26 +6,26 @@ const Surrounder = function ({ Top, Left, Right, Bottom, children }) { let contents = { top: null, left: null, right: null, bottom: null }; if (Top) { - contents.top = (
{ Top }
); + contents.top = (
{ Top }
); } if (Left) { - contents.left = (
{ Left }
); + contents.left = (
{ Left }
); } if (Right) { - contents.right = (
{ Right }
); + contents.right = (
{ Right }
); } if (Bottom) { - contents.bottom = (
{ Bottom }
); + contents.bottom = (
{ Bottom }
); } return ( -
+
{ contents.top } -
+
{ contents.left } -
+
{ children }
@@ -36,7 +36,7 @@ const Surrounder = function ({ Top, Left, Right, Bottom, children }) {
); -}; // End +}; // Ends export { Surrounder }; diff --git a/src/containers/VisitPage.js b/src/containers/VisitPage.js index 67f52ccb..02308470 100644 --- a/src/containers/VisitPage.js +++ b/src/containers/VisitPage.js @@ -22,7 +22,7 @@ import ErrorListener from '../components/prompts/ErrorListener'; import FeedbackPrompt from '../components/prompts/FeedbackPrompt'; import FeedbackForm from '../components/prompts/FeedbackForm'; import { FeedbackAnytime } from '../components/prompts/FeedbackAnytime'; -import StepBar from '../components/StepBar'; +import { StepBar } from '../components/StepBar'; import { BigButton } from '../forms/inputs'; import { ButtonReset } from '../forms/ButtonReset'; import PredictionsWarning from '../components/prompts/PredictionsWarning'; diff --git a/src/test/components/StepBar.test.js b/src/test/components/StepBar.test.js index 157fe2e0..df8918db 100644 --- a/src/test/components/StepBar.test.js +++ b/src/test/components/StepBar.test.js @@ -1,7 +1,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import StepBar from '../../components/StepBar'; +import { StepBar } from '../../components/StepBar'; import { STEP_VALS } from '../../forms/STEP_VALS'; import { translations } from '../helpers';