File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/app/components/TimeTravel Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ const handle = (props: HandleProps): JSX.Element => {
2929
3030function MainSlider ( props : MainSliderProps ) : JSX . Element {
3131 const dispatch = useDispatch ( ) ;
32- const { snapshotsLength } = props ; // destructure props to get our total number of snapshots
32+ const { snapshots } = props ; // destructure props to get our total number of snapshots
3333 const [ sliderIndex , setSliderIndex ] = useState ( 0 ) ; // create a local state 'sliderIndex' and set it to 0.
3434 const { tabs, currentTab } : MainState = useSelector ( ( state : RootState ) => state . main ) ;
3535 const { currLocation } = tabs [ currentTab ] ; // we destructure the currentTab object
@@ -49,7 +49,7 @@ function MainSlider(props: MainSliderProps): JSX.Element {
4949 className = 'travel-slider'
5050 color = '#0af548'
5151 min = { 0 } // index of our first snapshot
52- max = { snapshotsLength - 1 } // index of our last snapshot
52+ max = { snapshots . length - 1 } // index of our last snapshot
5353 value = { sliderIndex } // currently slider thumb position
5454 onChange = { ( index : any ) => {
5555 // when the slider position changes
You can’t perform that action at this time.
0 commit comments