footer lang added

This commit is contained in:
Kakabay 2023-03-09 19:11:46 +05:00
parent 88426851b8
commit 71adf1af60
1 changed files with 56 additions and 37 deletions

View File

@ -1,23 +1,26 @@
// Modules
import { v4 as uuidv4 } from "uuid";
import { useSelector } from "react-redux";
import { v4 as uuidv4 } from 'uuid';
import { useSelector } from 'react-redux';
// Icons
import phone from "../../assets/icons/phone.svg";
import mail from "../../assets/icons/mail.svg";
import location from "../../assets/icons/location.svg";
import { ReactComponent as Instagram } from "../../assets/icons/insta-black.svg";
import { ReactComponent as Facebook } from "../../assets/icons/fb-black.svg";
import { ReactComponent as TikTok } from "../../assets/icons/tiktok-black.svg";
import phone from '../../assets/icons/phone.svg';
import mail from '../../assets/icons/mail.svg';
import location from '../../assets/icons/location.svg';
import { ReactComponent as Instagram } from '../../assets/icons/insta-black.svg';
import { ReactComponent as Facebook } from '../../assets/icons/fb-black.svg';
import { ReactComponent as TikTok } from '../../assets/icons/tiktok-black.svg';
// Types
import { RootState } from "../../types/store.types";
import { RootState } from '../../types/store.types';
// Components
import FooterListItem from "./FooterListItem";
import FooterListItem from './FooterListItem';
import { Api } from '../../api/Api';
const Footer = () => {
const categories = useSelector<RootState, RootState["categories"]["data"]>(
(state) => state.categories.data
const language = new Api('').language;
const categories = useSelector<RootState, RootState['categories']['data']>(
(state) => state.categories.data,
);
return (
<footer className="footer">
@ -27,13 +30,9 @@ const Footer = () => {
<ul className="footer-nav-list">
{categories.data[0].id > -1
? categories.data.map((category) => (
<FooterListItem
id={category.id}
name={category.name}
key={uuidv4()}
/>
<FooterListItem id={category.id} name={category.name} key={uuidv4()} />
))
: ""}
: ''}
</ul>
</nav>
<div className="footer-info">
@ -41,26 +40,50 @@ const Footer = () => {
<div className="footer-info-item-icon">
<img src={phone} alt="phone" />
</div>
<h3 className="footer-info-item-title">
+(993) 12 68-07-92, 94-08-01{" "}
</h3>
<h3 className="footer-info-item-title">+993 64 28-28-66 </h3>
</div>
<div className="footer-info-item">
<div className="footer-info-item-icon">
<img src={mail} alt="mail" />
</div>
<h3 className="footer-info-item-title">turkmen@info.tm</h3>
</div>
<div className="footer-info-item">
<div className="footer-info-item-icon">
<img src={location} alt="location" />
</div>
<h3 className="footer-info-item-title">
115184, Ашхабад, Битарап шаелы, 25 (Центр телерадиовещания
Туркменистана)
</h3>
<h3 className="footer-info-item-title">turkmentv24@gmail.com</h3>
</div>
{language === 'RU' ? (
<>
<div className="footer-info-item">
<div className="footer-info-item-icon">
<img src={location} alt="location" />
</div>
<h3 className="footer-info-item-title">
744000, Ашхабад, Олимпийский городок, Международный вещательный центр enesha
</h3>
</div>
</>
) : language === 'EN' ? (
<>
<div className="footer-info-item">
<div className="footer-info-item-icon">
<img src={location} alt="location" />
</div>
<h3 className="footer-info-item-title">
744000, Ashgabat, International broadcasting center
</h3>
</div>
</>
) : (
<>
<div className="footer-info-item">
<div className="footer-info-item-icon">
<img src={location} alt="location" />
</div>
<h3 className="footer-info-item-title">
744000, Asgabat, Olimpiya säherjigi, Halkara yaylyma beris merkezi enesha{' '}
</h3>
</div>
</>
)}
<div className="footer-info-item">
<div className="footer-info-item-icon">
<Instagram />
@ -83,14 +106,10 @@ const Footer = () => {
</div>
<div className="footer-info-item">
<h3 className="footer-info-item-title">
Реклама на ТВ и радио: (993) 12 78-13-99
</h3>
<h3 className="footer-info-item-title">Реклама на ТВ и радио: (993) 12 78-13-99</h3>
</div>
<div className="footer-info-item">
<h3 className="footer-info-item-title">
Реклама на сайте: (993) 12 78-13-99
</h3>
<h3 className="footer-info-item-title">Реклама на сайте: (993) 12 78-13-99</h3>
</div>
</div>
</div>