File tree Expand file tree Collapse file tree 5 files changed +26
-3
lines changed
Expand file tree Collapse file tree 5 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22import "./App.scss" ;
33import RoverDetails from "./Components/RoverDetails/RoverDetails" ;
4+ import PhotoOfTheDay from "./Components/photoOfTheDay/photoOfTheDay" ;
45
56function App ( ) {
67 return < RoverDetails /> ;
Original file line number Diff line number Diff line change 33body {
44 background-color : $blueBackground ;
55}
6+
7+ #loading-text {
8+ text-align : center ;
9+ font-family : $PublicSans ;
10+ color : whitesmoke ;
11+ margin : 30px 0 ;
12+ }
613#mission-manifest-container {
714 font-family : $MartianMono ;
815 width : 40vw ;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ function MissionManifest(props: MissionManifestProps) {
4747 } , [ props . roverType ] ) ;
4848
4949 if ( ! manifestData ) {
50- return < p > Loading...</ p > ;
50+ return < p id = "loading-text" > Loading...</ p > ;
5151 } else {
5252 return (
5353 < div
Original file line number Diff line number Diff line change 1+ @import " ../../Styles/GlobalStyles.scss" ;
2+
3+
14body {
25 background : #062356 ;
36 color : #fffff2 ;
@@ -14,6 +17,13 @@ body {
1417 font-size : 50px ;
1518}
1619
20+ h2 {
21+ font-family : $PublicSans ;
22+ text-align : center ;
23+ padding : 100px auto ;
24+ font-size : 0.8rem ;
25+ }
26+
1727
1828@media (max-width : 898px ) {
1929 .sliderContainer {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import "slick-carousel/slick/slick.css";
44import "slick-carousel/slick/slick-theme.css" ;
55import "./RoverImages.scss" ;
66import { ClipLoader } from "react-spinners" ;
7- import { MissionManifestProps } from "../RoverDetails/RoverDetails" ;
7+ import { MissionManifestProps , rovers } from "../RoverDetails/RoverDetails" ;
88
99type RoverResponse = {
1010 id : number ;
@@ -61,6 +61,9 @@ function RoverImages(props: MissionManifestProps) {
6161 fetchData ( ) ;
6262 } , [ props . roverType ] ) ;
6363
64+ let firstLetter = props . roverType . charAt ( 0 ) . toUpperCase ;
65+
66+
6467 if ( error ) {
6568 return (
6669 < div >
@@ -83,7 +86,7 @@ function RoverImages(props: MissionManifestProps) {
8386 />
8487 </ div >
8588 ) ;
86- } else {
89+ } else if ( props . roverType === rovers . CURIOSITY ) {
8790 return (
8891 < div className = "sliderContainer" >
8992 < Slider { ...sliderSettings } >
@@ -93,6 +96,8 @@ function RoverImages(props: MissionManifestProps) {
9396 </ Slider >
9497 </ div >
9598 ) ;
99+ } else {
100+ return < h2 > Sorry no images taken by the rover today. < br /> The rover's mission has been completed! </ h2 >
96101 }
97102}
98103
You can’t perform that action at this time.
0 commit comments