diff --git a/frontend/src/assets/img/stepBackgrounds/step1.jpg b/frontend/src/assets/img/stepBackgrounds/step1.jpg new file mode 100644 index 0000000..253f339 Binary files /dev/null and b/frontend/src/assets/img/stepBackgrounds/step1.jpg differ diff --git a/frontend/src/assets/img/stepBackgrounds/step2.jpg b/frontend/src/assets/img/stepBackgrounds/step2.jpg new file mode 100644 index 0000000..487a49d Binary files /dev/null and b/frontend/src/assets/img/stepBackgrounds/step2.jpg differ diff --git a/frontend/src/assets/img/stepBackgrounds/step3.jpg b/frontend/src/assets/img/stepBackgrounds/step3.jpg new file mode 100644 index 0000000..f12c93b Binary files /dev/null and b/frontend/src/assets/img/stepBackgrounds/step3.jpg differ diff --git a/frontend/src/assets/img/stepBackgrounds/step4.jpg b/frontend/src/assets/img/stepBackgrounds/step4.jpg new file mode 100644 index 0000000..f21f2e9 Binary files /dev/null and b/frontend/src/assets/img/stepBackgrounds/step4.jpg differ diff --git a/frontend/src/assets/img/stepBackgrounds/step5.jpg b/frontend/src/assets/img/stepBackgrounds/step5.jpg new file mode 100644 index 0000000..a0f50d4 Binary files /dev/null and b/frontend/src/assets/img/stepBackgrounds/step5.jpg differ diff --git a/frontend/src/assets/img/stepBackgrounds/step6.jpg b/frontend/src/assets/img/stepBackgrounds/step6.jpg new file mode 100644 index 0000000..de135e0 Binary files /dev/null and b/frontend/src/assets/img/stepBackgrounds/step6.jpg differ diff --git a/frontend/src/assets/styles/step.scss b/frontend/src/assets/styles/step.scss index 88d8e9d..c561ed0 100644 --- a/frontend/src/assets/styles/step.scss +++ b/frontend/src/assets/styles/step.scss @@ -1,6 +1,7 @@ .step-container { flex-grow: 1; overflow: auto; + background-size: cover; } .step-overlay { diff --git a/frontend/src/components/Stepper.js b/frontend/src/components/Stepper.js index 5830608..9f28952 100644 --- a/frontend/src/components/Stepper.js +++ b/frontend/src/components/Stepper.js @@ -9,7 +9,7 @@ import LocationStep from './steps/location/LocationStep' import SoilStep from './steps/soilvariant/SoilStep' import HabitatStep from './steps/habitat/HabitatStep'; import ZoneStep from './steps/zone/ZoneStep'; -import SummaryStep from './steps/summary/ZoneStep'; +import SummaryStep from './steps/summary/SummaryStep'; import ResultsStep from './steps/results/ResultsStep' const steps = [ diff --git a/frontend/src/components/steps/Step.js b/frontend/src/components/steps/Step.js index dd50c37..047b3c7 100644 --- a/frontend/src/components/steps/Step.js +++ b/frontend/src/components/steps/Step.js @@ -1,23 +1,24 @@ +import { useEffect, useState } from 'react'; import { Row, Col } from 'reactstrap' -import SampleBackground from '../../assets/img/sample-bg.jpg'; +import SampleBackground from '../../assets/img/stepBackgrounds/step1.jpg'; export default function Step(props) { - const StepBackgroundImage = props.backgroundImage || SampleBackground - const stepBackground = { - backgroundImage: `url(${StepBackgroundImage})` - }; + + const [stepBackgroundImage, setStepBackground] = useState(SampleBackground) + + useEffect(() => setStepBackground(props.backgroundImage || SampleBackground), [props.backgroundImage]) return ( -
@@ -24,6 +25,6 @@ export default function SoilVariantStep(props) {
)
return (
-