setVideoActive(file)}
- >
-
{i + 1}
-
-
- 22:05
-
-
-
{file.name}
-
{file.text}
+ <>
+ {1 && (
+
+
+ {/* {lesson.files.map((file: any, i: any) => ( */}
+
setVideoActive(video)}
+ >
+
{num}
+
+
+ 22:05
+
+
+
{video.name}
+ {/*
{file.text}
*/}
+
+ {/* ))} */}
- ))}
-
+ )}
+ >
);
}
-export default connect((state: any) => ({
- selectedVideo: state.book.selectedVideo,
-}), {
- setVideoActive : book.setVideoActive,
-})(LessonPlayList);
+export default connect(
+ (state: any) => ({
+ selectedVideo: state.book.selectedVideo,
+ }),
+ {
+ setVideoActive: book.setVideoActive,
+ }
+)(LessonPlayList);
diff --git a/src/views/VideoTube/index.scss b/src/views/VideoTube/index.scss
index fadab3f..aec1337 100644
--- a/src/views/VideoTube/index.scss
+++ b/src/views/VideoTube/index.scss
@@ -159,7 +159,7 @@
.video-tube {
main {
max-width: 1350px;
- margin-top: 30px;
+ margin-top: 10px;
}
&__content {
flex: 8;
@@ -253,7 +253,7 @@
.video-tube {
main {
max-width: 1250px;
- margin-top: 30px;
+ margin-top: 10px;
padding: 0px 10px;
}
&__content {
diff --git a/src/views/VideoTube/index.tsx b/src/views/VideoTube/index.tsx
index bfb1ac9..fbcd148 100644
--- a/src/views/VideoTube/index.tsx
+++ b/src/views/VideoTube/index.tsx
@@ -6,7 +6,7 @@ import Attachments from "./Attachments/index";
import Book from "./Book/index";
import Comment from "./Comment/index";
import AddComment from "./AddComment/index";
-import Video from '../../components/JolPlayer';
+import Video from "../../components/JolPlayer";
import "./index.scss";
import listIcon from "../../assets/icons/list.png";
@@ -14,9 +14,24 @@ import { connect } from "react-redux";
import scroll from "../../util/scroll.js";
import { book } from "../../redux/actions";
-function VodTube({ videoList, getList, list, selectedVideo, comments }: any) {
+function VodTube({
+ videoList,
+ getBookList,
+ list,
+ selectedVideo,
+ comments,
+ info,
+ getInfo,
+}: any) {
useEffect(() => {
- getList();
+ getBookList();
+ getInfo({
+ bookId: 18,
+ // window.location.pathname.slice(
+ // window.location.pathname.lastIndexOf("/") + 1,
+ // window.location.pathname.length
+ // ),
+ });
scroll.goToTop();
}, []);
return (
@@ -28,10 +43,10 @@ function VodTube({ videoList, getList, list, selectedVideo, comments }: any) {
{/*
*/}
-
+
درس دوم / بیست و یکم
-
{selectedVideo.name}
-
{selectedVideo.text}
+
{selectedVideo?.name}
+ {/*
{selectedVideo.text}
*/}
@@ -58,8 +73,8 @@ function VodTube({ videoList, getList, list, selectedVideo, comments }: any) {
- {videoList.lessons?.map((lesson: any, i: any) => (
-
+ {info?.vods.map((video: any, i: any) => (
+
))}
@@ -114,6 +129,7 @@ export default connect(
selectedVideo: state.book.selectedVideo,
list: state.book.list,
comments: state.book.comments,
+ info: state.book.info,
}),
- { getList: book.list }
+ { getInfo: book.info, getBookList : book.list }
)(VodTube);