Skip to content

Commit 32df1ab

Browse files
committed
new changes
1 parent 4a05e50 commit 32df1ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1480
-460
lines changed

component/Carousel.js

+14-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from "react";
22
import styles from "../styles/Home.module.css";
33
import { useRouter } from "next/router";
44
import { Swiper, SwiperSlide } from "swiper/react";
5-
// import HomeContent from '../pages/homeapi/static.json'
65
import {
76
Navigation,
87
Scrollbar,
@@ -18,16 +17,17 @@ import "swiper/css/autoplay";
1817
export default function Slider({ data }) {
1918
const { locale } = useRouter();
2019

21-
const getImage = (title) => {
22-
switch (title) {
23-
case 'Audio transkripsiya': return <img src='case-1.png' alt='img' />
24-
case 'Diktant': return <img src='case-2.png' alt='img' />
25-
case 'Ovozli buyruqlar': return <img src='case-3.png' alt='img' />
26-
case 'Ojizlar uchun qulaylik': return <img src='goals-1.png' alt='img' />
27-
case 'Onlayn qidiruvlar': return <img src='sun.png' alt='img' />
20+
const getImage = (i) => {
21+
switch (i) {
22+
case 0: return <img src='case-1.png' alt='img' />
23+
case 1: return <img src='case-2.png' alt='img' />
24+
case 2: return <img src='case-3.png' alt='img' />
25+
case 3: return <img src='goals-1.png' alt='img' />
26+
case 4: return <img src='sun.png' alt='img' />
2827
default: return <img src='chat-text.png' alt='img' />
2928
}
3029
}
30+
console.log(locale);
3131

3232
return (
3333
<div className={styles.our_goal + " our_goal"}>
@@ -50,7 +50,7 @@ export default function Slider({ data }) {
5050
slidesPerView={3}
5151
loop={true}
5252
navigation
53-
autoplay={true}
53+
// autoplay={true}
5454
speed={300}
5555
breakpoints={{
5656
0: {
@@ -76,15 +76,17 @@ export default function Slider({ data }) {
7676
value.stt_cases.map((item_value, i) =>
7777
<SwiperSlide key={i}>
7878
<div className={styles.item}>
79-
{getImage(item_value.case)}
80-
<div className={styles.text}>
79+
{getImage(i)}
80+
<div
81+
className={styles.text}
82+
>
8183
<h4>{item_value?.case}</h4>
8284
<h5>{item_value?.case_text}</h5>
8385
</div>
8486
</div>
8587
</SwiperSlide>
8688
)
87-
}
89+
}
8890
</Swiper>
8991
</div>
9092
</div>

component/ChatAnimated.jsx

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react'
2+
import styles from '../styles/ChatAnimated.module.css'
3+
4+
const ChatAnimated = () => {
5+
return (
6+
<div className={styles.ChatAnimated}>
7+
<div>Coming Soon</div>
8+
</div>
9+
)
10+
}
11+
12+
export default ChatAnimated

component/Footer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function Footer() {
2121
<div className={styles.footer__main}>
2222
{
2323
(router.pathname === "/" || router.pathname === "/pricing") ?
24-
<img className={styles.footer__logo} src="/logo.png" alt='logofooter' /> :
24+
<img className={styles.footer__logo} src="/logo.svg" alt='logofooter' /> :
2525
<img className={styles.footer__logo} src="/newlogo.png" alt='logofooter' />
2626
}
2727
<div className={styles.powered}>

component/FrequentlyCases.js

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React from "react";
2-
import styles from "../styles/Home.module.css";
2+
import styles from "../styles/FrequentlyCases.module.css";
33
import { useRouter } from "next/router";
44
import { Swiper, SwiperSlide } from "swiper/react";
5-
import HomeContent from '../pages/homeapi/static.json'
65
import {
76
Navigation,
87
Scrollbar,
@@ -18,13 +17,13 @@ import "swiper/css/autoplay";
1817
export default function FrequentlyCases({ data }) {
1918
const { locale } = useRouter();
2019

21-
const getImage = (title) => {
22-
switch (title) {
23-
case 'Audio kitoblar': return <img src='case-1.png' alt='img' />
24-
case 'Marketing nutqlari': return <img src='case-2.png' alt='img' />
25-
case 'Digital darsliklar': return <img src='case-3.png' alt='img' />
26-
case 'YouTube hikoyalari': return <img src='goals-1.png' alt='img' />
27-
case 'Yangiliklar bayoni': return <img src='sun.png' alt='img' />
20+
const getImage = (i) => {
21+
switch (i) {
22+
case 0: return <img src='case-1.png' alt='img' />
23+
case 1: return <img src='case-2.png' alt='img' />
24+
case 2: return <img src='case-3.png' alt='img' />
25+
case 3: return <img src='goals-1.png' alt='img' />
26+
case 4: return <img src='sun.png' alt='img' />
2827
default: return <img src='chat-text.png' alt='img' />
2928
}
3029
}
@@ -76,7 +75,7 @@ export default function FrequentlyCases({ data }) {
7675
value?.tts_cases.map((item_value, i) =>
7776
<SwiperSlide key={i}>
7877
<div className={styles.item}>
79-
{getImage(item_value.case)}
78+
{getImage(i)}
8079
<div className={styles.text}>
8180
<h4>{item_value.case}</h4>
8281
<h5>{item_value.case_text}</h5>

component/Header.js

+33-49
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import styles from "../styles/Header.module.css";
22
import Link from "next/link";
33
import { useRouter } from "next/router";
4-
import { useState } from "react";
4+
import { useEffect, useState } from "react";
55
import Chevron from "./Question/Chevron";
66
import NavbarApi from "../pages/navbarapi/static.json";
7+
import Dropdown from "./Question/DropDown";
78

8-
function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
9+
function Header({ menuToggle, setMenuToggle, openLang, setOpenLang, setModal }) {
910
const router = useRouter();
1011
const { asPath, locale } = router;
1112
const [stepDropDown, setStepDropDown] = useState(false);
1213
const [hakDropDown, sethakDropDown] = useState(false);
1314
const [otherDropDown, setOtherDropDown] = useState(false);
15+
const [mounted, setMounted] = useState(false);
1416

1517
const openDropdown = () => {
1618
setStepDropDown(!stepDropDown);
@@ -29,11 +31,16 @@ function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
2931
setOtherDropDown(!otherDropDown);
3032
};
3133

34+
useEffect(() => setMounted(true), []);
35+
if (!mounted) return null;
36+
3237
return NavbarApi.menu
3338
.filter((p) => p.languages_code === locale)
3439
.map(
3540
({
3641
id,
42+
malumot,
43+
malumotlar,
3744
bosqich,
3845
bosqichlar,
3946
hakaton,
@@ -43,6 +50,8 @@ function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
4350
qollanma,
4451
boshqa,
4552
boshqalar,
53+
waitless,
54+
contact
4655
}) => (
4756
<div className={
4857
(router.pathname === "/" || router.pathname === "/pricing") ?
@@ -51,13 +60,14 @@ function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
5160
styles.header__main + ' ' + styles.header__main_bg)
5261
: styles.header__main
5362
}
54-
key={id}>
63+
key={id}
64+
>
5565
<div className={styles.container}>
5666
<Link href="/">
5767
<a>
5868
{
5969
(router.pathname === "/" || router.pathname === "/pricing") ?
60-
<img className={styles.header_logo} src="/logo.png" alt="logo" /> :
70+
<img className={styles.header_logo} src="/logo.svg" alt="logo" /> :
6171
<img className={styles.header_logo} src="/newlogo.png" alt="logo" />
6272
}
6373
</a>
@@ -146,7 +156,7 @@ function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
146156
onMouseOut={() => setStepDropDown(false)}
147157
className={styles.item + " " + styles.noHover}
148158
>
149-
{bosqich}
159+
{malumot}
150160

151161
<Chevron
152162
className={"rotate"}
@@ -162,39 +172,11 @@ function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
162172
: styles.left
163173
}
164174
>
165-
{bosqichlar.map((value, i) => (
166-
<li key={i}>
167-
<Link href={`/bosqich/${i + 1}`}>
168-
<a onClick={() => setMenuToggle(false)}>{value}</a>
169-
</Link>
170-
</li>
171-
))}
172-
</ul>
173-
</div>
174-
<div
175-
onClick={() => openHakDropdown()}
176-
onMouseOver={() => sethakDropDown(true)}
177-
className={styles.item + " " + styles.noHover}
178-
>
179-
{hakaton}
180-
181-
<Chevron
182-
className={"rotate"}
183-
width={7}
184-
height={11}
185-
fill={(router.pathname === "/" || router.pathname === "/pricing") ? "#ffffff" : "#1717179d"}
186-
/>
187-
188-
<ul
189-
className={
190-
hakDropDown
191-
? styles.activeDrop + " " + styles.activeLeft
192-
: styles.left
193-
}
194-
>
195-
{hakatonlar.map((value, i) => (
175+
<Dropdown fill={(router.pathname === "/" || router.pathname === "/pricing") ? "#ffffff" : "#1717179d"} title={hakaton} content={hakatonlar} />
176+
<Dropdown fill={(router.pathname === "/" || router.pathname === "/pricing") ? "#ffffff" : "#1717179d"} title={bosqich} content={bosqichlar} />
177+
{malumotlar.map(({ path, value }, i) => (
196178
<li key={i}>
197-
<Link href={`/hakaton/${i + 1}`}>
179+
<Link href={path}>
198180
<a onClick={() => setMenuToggle(false)}>{value}</a>
199181
</Link>
200182
</li>
@@ -245,7 +227,7 @@ function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
245227
? styles.otherLeft
246228
: styles.activeDrop + " " + styles.activeOtherLeft
247229
}
248-
>
230+
>
249231
{boshqalar.map(({ path, value }, i) => (
250232
<li key={i}>
251233
<Link href={path}>
@@ -257,17 +239,19 @@ function Header({ menuToggle, setMenuToggle, openLang, setOpenLang }) {
257239
</div>
258240

259241
<div className={styles.waitlist}>
260-
<div>
261-
Bog`lanish
262-
<Chevron
263-
className={styles.chevron + " rotate"}
264-
width={7}
265-
height={11}
266-
fill={(router.pathname === "/" || router.pathname === "/pricing") ? "#ffffff" : "#1717179d"}
267-
/>
268-
</div>
269-
<a>Waitlistga qo'shilish</a>
270-
</div>
242+
<Link href={'/hamkorlar'}>
243+
<a>
244+
{contact}
245+
<Chevron
246+
className={styles.chevron + " rotate"}
247+
width={7}
248+
height={11}
249+
fill={(router.pathname === "/" || router.pathname === "/pricing") ? "#ffffff" : "#1717179d"}
250+
/>
251+
</a>
252+
</Link>
253+
<button type="button" onClick={() => setModal(true)}>{waitless}</button>
254+
</div>
271255

272256
<div
273257
onClick={() => setOpenLang(!openLang)}

component/Index/HeroIndex.js

+38-21
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,60 @@
1+
import Link from 'next/link';
12
import { useRouter } from 'next/router';
2-
import React from 'react'
3+
import React, { useState } from 'react'
34
import styles from '../../styles/HeroIndex.module.css'
5+
import Modal from '../Modal';
46
import Chevron from '../Question/Chevron'
57

68
export default function HeroIndex({ data }) {
79
const { locale } = useRouter();
10+
const [modal, setModal] = useState(false);
11+
12+
const openModal = (e) => {
13+
setModal(true)
14+
e.stopPropagation()
15+
}
16+
817
return (
918
data.data.filter((p) => p.languages_code === locale)
1019
.map((value, i) =>
11-
<div key={i} className={styles.container}>
20+
<div key={i} className={styles.container} onClick={()=>setModal(false)}>
1221
<div className={styles.block}>
1322
<div className={styles.hero_blur}></div>
1423
<div className={styles.content}>
15-
<div className={styles.voiceCollect}>
16-
{value?.uptitle}
17-
<Chevron
18-
className={styles.chevron + " rotate"}
19-
width={7}
20-
height={11}
21-
fill={"#ffffff"}
22-
/>
23-
</div>
24-
<h1>{value?.title}</h1>
25-
<p>
26-
{value?.contact_us_button}
27-
</p>
28-
29-
<div className={styles.waitlist}>
30-
<a>{value?.call_action_button}</a>
31-
<div>
32-
{value?.contact_us_button}
24+
<Link href={'/malumot'}>
25+
<a className={styles.voiceCollect}>
26+
{value?.uptitle}
3327
<Chevron
3428
className={styles.chevron + " rotate"}
3529
width={7}
3630
height={11}
3731
fill={"#ffffff"}
3832
/>
39-
</div>
33+
</a>
34+
</Link>
35+
<h1>{value?.title}</h1>
36+
<p>
37+
{value?.partnership_title}
38+
</p>
39+
40+
<div className={styles.waitlist}>
41+
<button type='button' onClick={openModal}>{value?.call_action_button}</button>
42+
<Link href={'/hamkorlar'}>
43+
<a>
44+
{value?.contact_us_button}
45+
<Chevron
46+
className={styles.chevron + " rotate"}
47+
width={7}
48+
height={11}
49+
fill={"#ffffff"}
50+
/>
51+
</a>
52+
</Link>
4053
</div>
54+
55+
{
56+
modal? <Modal setModal={setModal}/> : null
57+
}
4158
</div>
4259

4360
<div className={styles.mic}>

component/InitiativePartners.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from "react";
1+
import React from "react";
22
import styles from "../styles/InitiativePartners.module.css";
33
import { useRouter } from "next/router";
44
import { Swiper, SwiperSlide } from "swiper/react";
@@ -14,15 +14,11 @@ import "swiper/css";
1414
import "swiper/css/navigation";
1515
import "swiper/css/autoplay";
1616

17-
export default function InitiativePartners(props) {
18-
const [mounted, setMounted] = useState(false);
17+
export default function InitiativePartners(props) {
1918

2019
const { locale } = useRouter();
2120

22-
const { partners, data } = props;
23-
24-
useEffect(() => setMounted(true), []);
25-
if (!mounted) return null;
21+
const { partners, data } = props;
2622

2723
return (
2824
<div className={styles.initpartners}>

0 commit comments

Comments
 (0)