|
|
@ -10,6 +10,7 @@ import slide from "../../assets/icons/slide.png"; |
|
|
|
import play from "../../assets/icons/play.png"; |
|
|
|
import play from "../../assets/icons/play.png"; |
|
|
|
import bookmark from "../../assets/icons/bookmark.png"; |
|
|
|
import bookmark from "../../assets/icons/bookmark.png"; |
|
|
|
import StyledRating from "../../components/StyledRating"; |
|
|
|
import StyledRating from "../../components/StyledRating"; |
|
|
|
|
|
|
|
import location from "../../util/location"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { publicApi } from "../../redux/actions"; |
|
|
|
import { publicApi } from "../../redux/actions"; |
|
|
|
import scroll from "../../util/scroll"; |
|
|
|
import scroll from "../../util/scroll"; |
|
|
@ -25,19 +26,14 @@ function Course({ getInfo, info, categories, loading }: any) { |
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
scroll.goToTop(); |
|
|
|
scroll.goToTop(); |
|
|
|
getInfo({ |
|
|
|
getInfo({ |
|
|
|
bookId: 18, |
|
|
|
bookId: location.getId() |
|
|
|
// window.location.pathname.slice(
|
|
|
|
|
|
|
|
// window.location.pathname.lastIndexOf("/") + 1,
|
|
|
|
|
|
|
|
// window.location.pathname.length
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, []); |
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
const checkFreeCat = () => { |
|
|
|
const checkFreeCat = () => { |
|
|
|
const freeCat = info?.vods.filter((item: any) => item?.isFreeVOD)[0]; |
|
|
|
const freeCat = info?.vods.filter((item: any) => item?.isFreeVOD)[0]; |
|
|
|
localStorage.setItem("free", 1 + "," + freeCat?.categoryId); |
|
|
|
localStorage.setItem("free", location.getId() + "," + freeCat?.categoryId); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="course main d-flex flex-column" |
|
|
|
className="course main d-flex flex-column" |
|
|
|