From 111782763b82a26efeb384a655801f83f5416242 Mon Sep 17 00:00:00 2001 From: Kakabay Date: Tue, 7 Mar 2023 15:32:29 +0500 Subject: [PATCH] Videos lang added --- src/components/videos/Videos.tsx | 41 +++++++++++++++++--------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/components/videos/Videos.tsx b/src/components/videos/Videos.tsx index d56df66..cd8a3e2 100644 --- a/src/components/videos/Videos.tsx +++ b/src/components/videos/Videos.tsx @@ -1,29 +1,27 @@ // Modules -import { useEffect, useState } from "react"; -import { v4 as uuiv4 } from "uuid"; -import { useSelector, useDispatch } from "react-redux"; +import { useEffect, useState } from 'react'; +import { v4 as uuiv4 } from 'uuid'; +import { useSelector, useDispatch } from 'react-redux'; // Components -import SectionTitle from "../global/SectionTitle"; -import VideosItem from "./VideosItem"; +import SectionTitle from '../global/SectionTitle'; +import VideosItem from './VideosItem'; // Types -import { RootState } from "../../types/store.types"; +import { RootState } from '../../types/store.types'; // Api -import { Api } from "../../api/Api"; -import { url } from "../../url"; -import { videoParams } from "../../api/params"; +import { Api } from '../../api/Api'; +import { url } from '../../url'; +import { videoParams } from '../../api/params'; // Actions -import { setVideo } from "../../actions/setData"; -import Loader from "../global/Loader"; +import { setVideo } from '../../actions/setData'; +import Loader from '../global/Loader'; const Videos = () => { - const data = useSelector( - (state) => state.video.data - ); - const api = new Api(url + "/pagination/posts", videoParams); + const data = useSelector((state) => state.video.data); + const api = new Api(url + '/pagination/posts', videoParams); const language = api.language; const dispatch = useDispatch(); const [lastLanguage, setLastLanguage] = useState(language); @@ -38,9 +36,14 @@ const Videos = () => {
{data.status_code > 0 ? ( @@ -49,11 +52,11 @@ const Videos = () => { return (