commit
This commit is contained in:
parent
5e45d00d68
commit
267b06418e
|
|
@ -21,7 +21,7 @@ const NewsArticleImg = ({ img, video }: IProps) => {
|
|||
return (
|
||||
<div className={'news-article-image'}>
|
||||
{video && video.length > 53 ? (
|
||||
<ReactPlayer url={videoParse} controls width="100%" height="100%" />
|
||||
<ReactPlayer url={videoParse} controls width="100%" height="100%" light={placeholder} />
|
||||
) : (
|
||||
<LazyLoadImage
|
||||
src={img}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
// Modules
|
||||
import { Swiper, SwiperSlide, useSwiper } from "swiper/react";
|
||||
import { Navigation, Pagination, Autoplay } from "swiper";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { Swiper, SwiperSlide, useSwiper } from 'swiper/react';
|
||||
import { Navigation, Pagination, Autoplay } from 'swiper';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
// Components
|
||||
import NewsArticleImg from "./NewsArticleImg";
|
||||
import NewsArticleImg from './NewsArticleImg';
|
||||
|
||||
import { IPostData } from "../../types/store.types";
|
||||
import { IPostData } from '../../types/store.types';
|
||||
|
||||
interface IProps {
|
||||
images: IPostData["data"]["data"]["featured_images"];
|
||||
video: IPostData["data"]["data"]["video"];
|
||||
images: IPostData['data']['data']['featured_images'];
|
||||
video: IPostData['data']['data']['video'];
|
||||
}
|
||||
|
||||
const NewsArticleSlider = ({ images, video }: IProps) => {
|
||||
|
|
@ -27,10 +27,9 @@ const NewsArticleSlider = ({ images, video }: IProps) => {
|
|||
}}
|
||||
modules={[Navigation, Pagination, Autoplay]}
|
||||
pagination={{
|
||||
type: "bullets",
|
||||
type: 'bullets',
|
||||
clickable: true,
|
||||
}}
|
||||
>
|
||||
}}>
|
||||
{images.map((img) => (
|
||||
<SwiperSlide key={uuidv4()}>
|
||||
<NewsArticleImg img={img.path} video={video} />
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export interface IPostsData {
|
|||
title: string;
|
||||
slug: string;
|
||||
awtor: string;
|
||||
placeholder: string;
|
||||
views: number;
|
||||
excerpt: string;
|
||||
published_at: string;
|
||||
|
|
|
|||
Loading…
Reference in New Issue