Compare commits

...

4 Commits

Author SHA1 Message Date
Kakabay ab28f5f03b Build 2023-03-02 12:46:21 +05:00
Kakabay e28d0c83eb Video wroking 2023-03-02 12:46:17 +05:00
Kakabay 52be43193b Tarif key added 2023-03-02 12:46:07 +05:00
Kakabay 8fb1b061d5 Video player placeholder removed 2023-03-02 12:46:00 +05:00
5 changed files with 36 additions and 29 deletions

File diff suppressed because one or more lines are too long

2
dist/index.html vendored
View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Exchange</title> <title>Exchange</title>
<script type="module" crossorigin src="/assets/index.142a3e93.js"></script> <script type="module" crossorigin src="/assets/index.b192f733.js"></script>
<link rel="stylesheet" href="/assets/index.9661e2a1.css"> <link rel="stylesheet" href="/assets/index.9661e2a1.css">
</head> </head>
<body> <body>

View File

@ -10,11 +10,11 @@ const VideoPlayer = ({ videoUrl }) => {
<div className="video-player"> <div className="video-player">
<ReactPlayer <ReactPlayer
// url={hosting + videoUrl} // url={hosting + videoUrl}
url={videoUrl} url={`${videoUrl}`}
controls controls
// playIcon={videoUrl.length > 0 ? <PlayIcon /> : undefined} // playIcon={videoUrl.length > 0 ? <PlayIcon /> : undefined}
volume={1} volume={1}
light={true} light={false}
height={'100%'} height={'100%'}
width={'100%'} width={'100%'}
/> />

View File

@ -20,9 +20,9 @@ const Home = ({ lang, setPostId }) => {
useEffect(() => { useEffect(() => {
// Video fetch // Video fetch
// const VideoApi = new Api('https://tmex.gov.tm:8765/api/video', videoData, setVideoData).get({ const VideoApi = new Api('https://tmex.gov.tm:8765/api/video', videoData, setVideoData).get({
// 'X-Localization': lang, 'X-Localization': lang,
// }); });
// News fetch // News fetch
const NewsApi = new Api('https://tmex.gov.tm:8765/api/news', newsData, setNewsData).get({ const NewsApi = new Api('https://tmex.gov.tm:8765/api/news', newsData, setNewsData).get({
@ -123,8 +123,12 @@ const Home = ({ lang, setPostId }) => {
) : null} ) : null}
<div className="about-right"> <div className="about-right">
{/* {videoData ? <VideoPlayer videoUrl={videoData.data.video} /> : null} */} {videoData ? <VideoPlayer videoUrl={videoData.data.video} /> : null}
<VideoPlayer videoUrl={'https://www.exchange.gov.tm/page/normative-base?lang=ru'} /> {/* <VideoPlayer
videoUrl={
'https://tmex.gov.tm:8765/uploads/videos/b9ae49ed43c7ca9483eddc0d6c43ecb5.mp4'
}
/> */}
</div> </div>
</div> </div>
</div> </div>

View File

@ -2,6 +2,7 @@
import React from 'react'; import React from 'react';
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import { Api } from '../helpers/api'; import { Api } from '../helpers/api';
import { v4 as uuidv4 } from 'uuid';
// Components // Components
import Tab from '../components/Tab'; import Tab from '../components/Tab';
import SectionTitle from '../components/SectionTitle'; import SectionTitle from '../components/SectionTitle';
@ -82,6 +83,7 @@ const Tarif = ({ lang }) => {
? tarifData.data.map((tarif) => { ? tarifData.data.map((tarif) => {
return tarif.type === 'resident' && tarif.title != '-' ? ( return tarif.type === 'resident' && tarif.title != '-' ? (
<TarifService <TarifService
key={uuidv4()}
title={tarif.title} title={tarif.title}
price={tarif.prices.map((tarifPrice) => tarifPrice.price + ' ')} price={tarif.prices.map((tarifPrice) => tarifPrice.price + ' ')}
/> />
@ -96,6 +98,7 @@ const Tarif = ({ lang }) => {
? tarifData.data.map((tarif) => { ? tarifData.data.map((tarif) => {
return tarif.type === 'non_resident' && tarif.title != '-' ? ( return tarif.type === 'non_resident' && tarif.title != '-' ? (
<TarifService <TarifService
key={uuidv4()}
title={tarif.title} title={tarif.title}
price={tarif.prices.map((tarifPrice) => tarifPrice.price + ' ')} price={tarif.prices.map((tarifPrice) => tarifPrice.price + ' ')}
/> />