From 7d639b0683a7190f45be53c471a07214366358d3 Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Thu, 21 Oct 2021 13:16:03 +0330 Subject: [PATCH] reza added scroll --- src/redux/reducers/public.tsx | 4 +-- src/util/scroll.js | 3 ++ src/views/Subscription/index.tsx | 2 +- src/views/VideoTube/LessonPlayList/index.tsx | 34 +++++++++++++++++--- src/views/VideoTube/index.tsx | 34 +++++++++++--------- 5 files changed, 53 insertions(+), 24 deletions(-) diff --git a/src/redux/reducers/public.tsx b/src/redux/reducers/public.tsx index a1f1e7e..3208850 100644 --- a/src/redux/reducers/public.tsx +++ b/src/redux/reducers/public.tsx @@ -75,9 +75,7 @@ export default function publicApi(state = initialState, action: PublicAction) { loading: false, bookSection: data, error: null, - selectedVideo: videoId - ? data?.vods?.filter((item: any) => item.name === videoId)[0] - : data?.vods[0], + selectedVideo: data?.vods?.filter((item: any) => item.name === videoId)[0] }; case "public/vod/bookCourse": diff --git a/src/util/scroll.js b/src/util/scroll.js index d8776b4..362bf8d 100644 --- a/src/util/scroll.js +++ b/src/util/scroll.js @@ -4,6 +4,9 @@ class scroll { goToTop = () => { window.scrollTo(0,0); } + listScroll = () => { + + } } const _scroll = new scroll(); diff --git a/src/views/Subscription/index.tsx b/src/views/Subscription/index.tsx index 38a0ab5..8a13a11 100644 --- a/src/views/Subscription/index.tsx +++ b/src/views/Subscription/index.tsx @@ -29,7 +29,7 @@ function Subscription({ listVOD, getList, loading, selectedVOD, payment, verify ))}
- +