This commit is contained in:
Hristo Nedelkov 2023-10-21 18:54:52 +03:00
parent 92bb610dfc
commit abe733c3b9

View File

@ -12,7 +12,7 @@ type AdvisoryTopicsType = {
} }
const Advisories = () => { const Advisories = () => {
const dispatch = useDispatch(); const dispatch = useDispatch()
const { subStepAdvisories } = useSelector((state: RootState) => state.advisories) const { subStepAdvisories } = useSelector((state: RootState) => state.advisories)
const [selectedTitle, setSelectedTitle] = useState(Object.keys(advisoryTopics)[0]) const [selectedTitle, setSelectedTitle] = useState(Object.keys(advisoryTopics)[0])
@ -30,7 +30,7 @@ const Advisories = () => {
const index = topics.indexOf(currentTitle) const index = topics.indexOf(currentTitle)
return index <= subStepAdvisories ? true : false return index <= subStepAdvisories ? true : false
} }
const getIndexTitle = (title: string): number => { const getIndexTitle = (title: string): number => {
const topics = Object.keys(advisoryTopics) const topics = Object.keys(advisoryTopics)
const index = topics.indexOf(title) const index = topics.indexOf(title)