Multimedia langs added
This commit is contained in:
parent
a6369c6e73
commit
753bbc264c
|
|
@ -1,12 +1,12 @@
|
|||
// Modules
|
||||
import React from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Api } from "../helpers/api";
|
||||
import React from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Api } from '../helpers/api';
|
||||
// Components
|
||||
import SectionTitle from "../components/SectionTitle";
|
||||
import MultimediaTab from "../components/MultimediaTab";
|
||||
import Gallery from "../components/Gallery";
|
||||
import Videos from "../components/Videos";
|
||||
import SectionTitle from '../components/SectionTitle';
|
||||
import MultimediaTab from '../components/MultimediaTab';
|
||||
import Gallery from '../components/Gallery';
|
||||
import Videos from '../components/Videos';
|
||||
|
||||
const Multimedia = ({ lang }) => {
|
||||
const [imageTab, setImageTab] = useState(0);
|
||||
|
|
@ -24,10 +24,10 @@ const Multimedia = ({ lang }) => {
|
|||
|
||||
useEffect(() => {
|
||||
const MultimediaApi = new Api(
|
||||
"http://tmex.gov.tm:8765/api/media/categories",
|
||||
'http://tmex.gov.tm:8765/api/media/categories',
|
||||
multimediaData,
|
||||
setMultimediaData
|
||||
).get({ "X-Localization": lang });
|
||||
setMultimediaData,
|
||||
).get({ 'X-Localization': lang });
|
||||
}, [lang]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -52,13 +52,23 @@ const Multimedia = ({ lang }) => {
|
|||
<main>
|
||||
<div className="container">
|
||||
<div className="sub-page-wrapper sub-page-full">
|
||||
<SectionTitle title="Мультимедиа" />
|
||||
<SectionTitle
|
||||
title={`${
|
||||
lang === 'ru'
|
||||
? 'Мультимедиа'
|
||||
: lang === 'tm'
|
||||
? 'Multimediýa'
|
||||
: lang === 'en'
|
||||
? 'Multimedia'
|
||||
: null
|
||||
}`}
|
||||
/>
|
||||
<div className="multimedia-wrapper">
|
||||
<nav className="multimedia-nav">
|
||||
<div className="multimedia-top-gallery">
|
||||
{multimediaData
|
||||
? multimediaData.data.map((tab, index) => {
|
||||
return tab.type === "image" ? (
|
||||
return tab.type === 'image' ? (
|
||||
<MultimediaTab
|
||||
key={tab.id}
|
||||
title={tab.title}
|
||||
|
|
@ -72,7 +82,7 @@ const Multimedia = ({ lang }) => {
|
|||
<div className="multimedia-top-video">
|
||||
{multimediaData
|
||||
? multimediaData.data.map((tab, index) => {
|
||||
return tab.type === "video" ? (
|
||||
return tab.type === 'video' ? (
|
||||
<MultimediaTab
|
||||
key={tab.id}
|
||||
title={tab.title}
|
||||
|
|
|
|||
Loading…
Reference in New Issue