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 => {
29
29
30
30
function MainSlider ( props : MainSliderProps ) : JSX . Element {
31
31
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
33
33
const [ sliderIndex , setSliderIndex ] = useState ( 0 ) ; // create a local state 'sliderIndex' and set it to 0.
34
34
const { tabs, currentTab } : MainState = useSelector ( ( state : RootState ) => state . main ) ;
35
35
const { currLocation } = tabs [ currentTab ] ; // we destructure the currentTab object
@@ -49,7 +49,7 @@ function MainSlider(props: MainSliderProps): JSX.Element {
49
49
className = 'travel-slider'
50
50
color = '#0af548'
51
51
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
53
53
value = { sliderIndex } // currently slider thumb position
54
54
onChange = { ( index : any ) => {
55
55
// when the slider position changes
You can’t perform that action at this time.
0 commit comments