Skip to content

Commit d01b170

Browse files
committed
updated years number
1 parent 4369ee5 commit d01b170

File tree

3 files changed

+15
-63
lines changed

3 files changed

+15
-63
lines changed

component/Footer.js

+11-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { useState, useEffect } from 'react'
22
import { useRouter } from 'next/router'
33
import styles from '../styles/Footer.module.css'
44
import FooterApi from '../pages/footerapi/static.json'
@@ -8,31 +8,27 @@ export default function Footer() {
88
const router = useRouter()
99
const { locale } = router;
1010

11+
// for automatic update year
12+
const today = new Date();
13+
const year = today.getFullYear();
14+
1115
return (
1216

1317
FooterApi.footer
1418
.filter((p) => p.languages_code === locale)
1519
.map(({
1620
id, powered_by, guide, join_in_project, partners, descr, github, telegram, mozillo
1721
}) =>
18-
<footer className={(router.pathname === "/" || router.pathname === "/pricing") ? styles.footerBg + ' ' + styles.footer : styles.footer} key={id}>
22+
<footer className={styles.footer} key={id}>
1923
<div className="container__fluid">
2024
<div className={styles.footer__body}>
2125
<div className={styles.footer__main}>
22-
{
23-
(router.pathname === "/" || router.pathname === "/pricing") ?
24-
<img className={styles.footer__logo} src="/logo.svg" alt='logofooter' /> :
25-
<img className={styles.footer__logo} src="/newlogo.png" alt='logofooter' />
26-
}
26+
<img className={styles.footer__logo} src="/newlogo.png" alt='logofooter' />
2727
<div className={styles.powered}>
2828
<h3>{powered_by}</h3>
2929
</div>
3030

31-
{
32-
(router.pathname === "/" || router.pathname === "/pricing") ?
33-
<img className={styles.footer__logo2} src="/commonwhite.png" /> :
34-
<img className={styles.footer__logo2} src="/footer__logo-img.png" />
35-
}
31+
<img className={styles.footer__logo2} src="/footer__logo-img.png" />
3632
</div>
3733
<div className={styles.footer__menu}>
3834
<div className={styles.menu_footer}>
@@ -59,23 +55,15 @@ export default function Footer() {
5955
<li>
6056
<Link href="https://github.com/uzbekvoice">
6157
<a target={'_blank'}>
62-
{
63-
(router.pathname === "/" || router.pathname === "/pricing") ?
64-
<img className={styles.footer__logo2} src="/github.png" /> :
65-
<img className={styles.footer__logo2} src="/github-white.png" />
66-
}
58+
<img src="/github.png" />
6759
<span>{github}</span>
6860
</a>
6961
</Link>
7062
</li>
7163
<li>
7264
<Link href="https://t.me/uzbekvoice">
7365
<a target={'_blank'}>
74-
{
75-
(router.pathname === "/" || router.pathname === "/pricing") ?
76-
<img className={styles.footer__logo2} src="/telegramm.png" /> :
77-
<img className={styles.footer__logo2} src="/telegramm-white.png" />
78-
}
66+
<img src="/telegramm.png" />
7967
<span>{telegram}</span>
8068
</a>
8169
</Link>
@@ -95,7 +83,7 @@ export default function Footer() {
9583
</div>
9684
</div>
9785
</div>
98-
<h3>{descr}</h3>
86+
<h3>UzbekVoice.ai © {year} Barcha huquqlar himoyalangan.</h3>
9987
</div>
10088
</footer>
10189
)

pages/footerapi/static.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"github": "Github",
1111
"telegram": "Telegram jamoa",
1212
"mozillo": "Mozilla nutqi",
13-
"descr":"UzbekVoice.ai © 2022. Barcha huquqlar himoyalangan."
13+
"descr":"UzbekVoice.ai © 2023. Barcha huquqlar himoyalangan."
1414
},
1515
{
1616
"id": 2,
@@ -22,7 +22,7 @@
2222
"github": "Github",
2323
"telegram": "Присоединиться к сообществу",
2424
"mozillo": "Дискурс Mozilla",
25-
"descr":"UzbekVoice.ai © 2022. Все права защищены."
25+
"descr":"UzbekVoice.ai © 2023. Все права защищены."
2626
},
2727
{
2828
"id": 3,
@@ -34,7 +34,7 @@
3434
"github": "Github",
3535
"telegram": "Telegram team",
3636
"mozillo": "Mozilla discourse",
37-
"descr":"UzbekVoice.ai © 2022. All rights reserved."
37+
"descr":"UzbekVoice.ai © 2023. All rights reserved."
3838
}
3939
]
4040
}

pages/partnersapi/static.json

+1-37
Original file line numberDiff line numberDiff line change
@@ -38,48 +38,12 @@
3838
"button": "Apply now"
3939
}
4040
],
41-
"waitless": [
42-
{
43-
"id": 1,
44-
"languages_code": "uz-UZ",
45-
"title": "Waitlistga qo`shilish",
46-
"descr": "Yangiliklarga obuna bo’lish",
47-
"label_name": "Ismingiz",
48-
"label_comment": "E-mail",
49-
"placeholder_name": "Ismingizni kiriting",
50-
"placeholder_email": "E-mailingizni kiriting",
51-
"button": "Waitlistga qo’shilish"
52-
},
53-
54-
{
55-
"id": 2,
56-
"languages_code": "ru-RU",
57-
"title": "Присоединяйтесь к списку ожидающих",
58-
"descr": "Подписаться на новости",
59-
"label_name": "Имя",
60-
"label_comment": "Электронная почта",
61-
"placeholder_name": "Введите свое имя",
62-
"placeholder_email": "Введите адрес электронной почты",
63-
"button": "Присоединяйтесь к списку ожидающих"
64-
},
65-
{
66-
"id": 3,
67-
"languages_code": "en-US",
68-
"title": "Join to waitlist",
69-
"descr": "Subscribe to news",
70-
"label_name": "Name",
71-
"label_comment": "E-mail",
72-
"placeholder_name": "Enter your name",
73-
"placeholder_email": "Enter your E-mail",
74-
"button": "Join to waitlist"
75-
}
76-
],
7741

7842
"hack_form": [
7943
{
8044
"id": 1,
8145
"languages_code": "uz-UZ",
82-
"title": "Voice AI Challenge 2022",
46+
"title": "Voice AI Challenge 2023",
8347
"descr": "Hakatonga ro'yxatdan o'ting",
8448
"form_title": "Shaxsiy ma'lumot",
8549
"form_title2": "Aloqa ma'lumotlar",

0 commit comments

Comments
 (0)