Add a progress bar
parent
b88721b4f8
commit
c774725270
@ -0,0 +1,15 @@
|
||||
import React from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { selectCurrentSegmentIndex, selectSegments } from '../store/selectors'
|
||||
|
||||
export const Progress = () => {
|
||||
const curIdx = useSelector(selectCurrentSegmentIndex)
|
||||
const segments = useSelector(selectSegments)
|
||||
return (
|
||||
<progress
|
||||
style={{ width: '100%' }}
|
||||
value={curIdx}
|
||||
max={segments.length - 1}
|
||||
/>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue