diff --git a/src/components/videos/Videos.tsx b/src/components/videos/Videos.tsx index cc2d3b4..d27741a 100644 --- a/src/components/videos/Videos.tsx +++ b/src/components/videos/Videos.tsx @@ -1,29 +1,31 @@ // 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"; -import { dateParse } from '../../helpers/dateParser'; +import { dateParse } from "../../helpers/dateParser"; // 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/new/posts', videoParams); + const data = useSelector( + (state) => state.video.data + ); + const api = new Api(url + "/pagination/new/posts", videoParams); const language = api.language; const dispatch = useDispatch(); const [lastLanguage, setLastLanguage] = useState(language); @@ -39,11 +41,21 @@ const Videos = () => {
@@ -54,14 +66,14 @@ const Videos = () => { return ( ); } diff --git a/src/components/videos/VideosItem.tsx b/src/components/videos/VideosItem.tsx index db57308..65f40e6 100644 --- a/src/components/videos/VideosItem.tsx +++ b/src/components/videos/VideosItem.tsx @@ -1,20 +1,26 @@ // Modules -import ReactPlayer from 'react-player'; -import { LazyLoadComponent } from 'react-lazy-load-image-component'; +import ReactPlayer from "react-player"; +import { LazyLoadComponent } from "react-lazy-load-image-component"; // Types -import { videosDataType } from '../../types/videos.types'; +import { videosDataType } from "../../types/videos.types"; -const VideosItem = ({ url, placeholder, date, excerpt }: videosDataType) => { +const VideosItem = ({ url, placeholder, date, title }: videosDataType) => { return (
- +
{date} -

{excerpt}

+

{title}

diff --git a/src/types/videos.types.ts b/src/types/videos.types.ts index 106e81f..03555ce 100644 --- a/src/types/videos.types.ts +++ b/src/types/videos.types.ts @@ -2,5 +2,5 @@ export interface videosDataType { url: string; placeholder: string; date: string; - excerpt: string; + title: string; }