reza added some change now

master
RezaAshrafi77 3 years ago
parent 8c8be6e2e6
commit 3661f6c42d
  1. 10
      src/views/Course/index.tsx
  2. 8
      src/views/VideoTube/index.tsx

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

@ -122,10 +122,10 @@ function VodTube({ selectedVideo, info, bookSection, loading }: any) {
<Footer />
</div>
{loading && (
<div className="full-loader">
<Loader size={50} />
</div>
)}
<div className="full-loader">
<Loader size={50} />
</div>
)}
</>
);
}

Loading…
Cancel
Save