diff --git a/src/features/map/ui/gas-station-map.tsx b/src/features/map/ui/gas-station-map.tsx index 8de342c..45a99df 100644 --- a/src/features/map/ui/gas-station-map.tsx +++ b/src/features/map/ui/gas-station-map.tsx @@ -56,7 +56,7 @@ interface StationListPanelProps { selectedStation: number | null; activeFilters: string[]; activeCities: string[]; - setSelectedStation: (id: number | null) => void; + handleMapStationClick: (id: number) => void; filterToFieldMap: { [key: string]: keyof Stations[number] }; allFilters: string[]; resetFilters: () => void; @@ -205,7 +205,7 @@ function StationListPanel({ selectedStation, activeFilters, activeCities, - setSelectedStation, + handleMapStationClick, filterToFieldMap, allFilters, resetCities, @@ -275,7 +275,7 @@ function StationListPanel({ ? 'border-blue-500 bg-blue-50' : 'border-gray-200 hover:bg-gray-50' }`} - onClick={() => setSelectedStation(station.id)} + onClick={() => handleMapStationClick(station.id)} >

{station.name}

@@ -365,6 +365,11 @@ export default function GasStationMap({ stations }: GasStationMapProps) { const [isStationListOpen, setIsStationListOpen] = useState(false); const [activeFilterTab, setActiveFilterTab] = useState('cities'); + useEffect(() => { + if (selectedStation === null) return; + setIsStationListOpen(true); + }, [selectedStation]); + // Все доступные фильтры const allFilters = [ // 'ДТ', -> нет значения в интерфейсе - TODO: поправить @@ -434,6 +439,16 @@ export default function GasStationMap({ stations }: GasStationMapProps) { [filteredStations], ); + const handleMapStationClick = (stationId: number) => { + setSelectedStation(() => { + if (selectedStation !== null && selectedStation === stationId) { + return null; + } + + return stationId; + }); + }; + // Переключение фильтра услуг const toggleFilter = (filter: string) => { setActiveFilters((prev) => @@ -494,7 +509,7 @@ export default function GasStationMap({ stations }: GasStationMapProps) { selectedStation={selectedStation} activeFilters={activeFilters} activeCities={activeCities} - setSelectedStation={setSelectedStation} + handleMapStationClick={handleMapStationClick} filterToFieldMap={filterToFieldMap} allFilters={allFilters} resetFilters={resetFilters} @@ -506,7 +521,7 @@ export default function GasStationMap({ stations }: GasStationMapProps) {
diff --git a/src/features/map/ui/yandex-map.tsx b/src/features/map/ui/yandex-map.tsx index 590f0f5..d36aeca 100644 --- a/src/features/map/ui/yandex-map.tsx +++ b/src/features/map/ui/yandex-map.tsx @@ -7,7 +7,7 @@ import { Point } from '../model'; type YandexMapProps = { points: Point[]; selectedStation: number | null; - setSelectedStation: Dispatch>; + handleMapStationClick: (id: number) => void; }; const mapCenter = [38.53575, 68.77905]; @@ -15,7 +15,7 @@ const mapCenter = [38.53575, 68.77905]; export const YandexMap = ({ points, selectedStation, - setSelectedStation, + handleMapStationClick, }: YandexMapProps) => { return ( - {points.map((point) => ( - - setSelectedStation(() => { - if (selectedStation !== null && selectedStation === point.id) { - return null; - } - - return point.id; - }) - } - /> - ))} + {points.map((point) => { + const isSelectedStation = selectedStation === point.id; + return ( + handleMapStationClick(point.id)} + /> + ); + })} ); diff --git a/src/pages-templates/about/index.tsx b/src/pages-templates/about/index.tsx index c13ee99..7d911d9 100644 --- a/src/pages-templates/about/index.tsx +++ b/src/pages-templates/about/index.tsx @@ -6,10 +6,9 @@ import Image from 'next/image'; import { AboutUsPageData } from '@/app/api-utlities/@types/about-us'; import AnimatedCounter from '@/shared/components/animated-counter'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; -import { Button } from '@/shared/shadcn-ui/button'; import { Card, CardContent } from '@/shared/shadcn-ui/card'; -import Container from '@/shared/shadcn-ui/conteiner'; import { CompanyTimeline } from '@/widgets/about-page/company-timeline'; import { StationGallery } from '@/widgets/about-page/station-gallery'; @@ -62,63 +61,59 @@ export default function AboutPage({ content }: AboutPageProps) { {/* Company Overview */} -
-
-
-
-
- -
-

- {t('about.overview.title')} -

-

- {t('about.overview.description1')} -

-

- {t('about.overview.description2')} -

-

- {t('about.overview.description3')} -

+
+
+
+ +
+

+ {t('about.overview.title')} +

+

+ {t('about.overview.description1')} +

+

+ {t('about.overview.description2')} +

+

+ {t('about.overview.description3')} +

-
- {[0, 1, 2, 3].map((index) => ( -
-
- -
-
-

- {t(`about.overview.benefits.${index}.title`)} -

-

- {t(`about.overview.benefits.${index}.description`)} -

-
-
- ))} +
+ {[0, 1, 2, 3].map((index) => ( +
+
+ +
+
+

+ {t(`about.overview.benefits.${index}.title`)} +

+

+ {t(`about.overview.benefits.${index}.description`)} +

+
-
-
- {t('about.overview.imageAlt')} -
+ ))}
-
+
+ {t('about.overview.imageAlt')} +
+
{/* Stats Section */} -
-
+
+

{t('about.stats.title')} @@ -147,200 +142,176 @@ export default function AboutPage({ content }: AboutPageProps) {

))}
- +
{/* Our History */} -
-
- -
-
- -
-

- {t('about.history.title')} -

-

- {t('about.history.subtitle')} -

-
-
- - - - + +
+
+ +
+

+ {t('about.history.title')} +

+

+ {t('about.history.subtitle')} +

-
+ + + + + {/* Our Stations */} - -
-
-
-
- -
-

- {t('about.stations.title')} -

-

- {t('about.stations.subtitle')} -

-
- - - -
-

- {t('about.stations.description')} -

- +
+ +
+
+
+

+ {t('about.stations.title')} +

+

+ {t('about.stations.subtitle')} +

-
- + +
+

+ {t('about.stations.description')} +

+ {/* */} +
+ +
{/* Our Values */} -
-
-
-
- -
-

- {t('about.values.title')} -

-

- {t('about.values.subtitle')} -

-
- -
- {[0, 1, 2].map((index) => ( - - -
- -
-

- {t(`about.values.items.${index}.title`)} -

-

- {t(`about.values.items.${index}.description`)} -

-
-
- ))} -
+
+
+
-
+

+ {t('about.values.title')} +

+

+ {t('about.values.subtitle')} +

+ + +
+ {[0, 1, 2].map((index) => ( + + +
+ +
+

+ {t(`about.values.items.${index}.title`)} +

+

+ {t(`about.values.items.${index}.description`)} +

+
+
+ ))} +
{/* Our Team */} - -
-
-
-
- -
-

- {t('about.team.title')} -

-

- {t('about.team.subtitle')} -

-
- -
- {content.team.map((member, index) => ( -
-
- {member.photo && ( - {t(`about.team.members.${index}.name`)} - )} -
-
-

{member.name}

-

{member.profession}

-
-
- ))} +
+ +
+
+
+

+ {t('about.team.title')} +

+

+ {t('about.team.subtitle')} +

-
- +
+ {content.team.map((member, index) => ( +
+
+ {member.photo && ( + {t(`about.team.members.${index}.name`)} + )} +
+
+

{member.name}

+

{member.profession}

+
+
+ ))} +
+ +
{/* Testimonials */} -
-
-
-
- -
-

- {t('about.testimonials.title')} -

-

- {t('about.testimonials.subtitle')} -

-
- -
- {content.reviews.map((review, index) => ( - - -
- {Array(5) - .fill(0) - .map((_, i) => ( - - ))} -
-

- "{review.review}" -

-

{review.fullname}

-
-
- ))} -
+
+
+
-
+

+ {t('about.testimonials.title')} +

+

+ {t('about.testimonials.subtitle')} +

+ + +
+ {content.reviews.map((review, index) => ( + + +
+ {Array(5) + .fill(0) + .map((_, i) => ( + + ))} +
+

"{review.review}"

+

{review.fullname}

+
+
+ ))} +
diff --git a/src/pages-templates/charity/index.tsx b/src/pages-templates/charity/index.tsx index 66b4353..5f44818 100644 --- a/src/pages-templates/charity/index.tsx +++ b/src/pages-templates/charity/index.tsx @@ -10,16 +10,14 @@ import { } from 'lucide-react'; import Image from 'next/image'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; -import { Button } from '@/shared/shadcn-ui/button'; import { Card, CardContent, - CardFooter, CardHeader, CardTitle, } from '@/shared/shadcn-ui/card'; -import Container from '@/shared/shadcn-ui/conteiner'; import { CtaSection } from '@/widgets/cta-section'; @@ -29,6 +27,32 @@ export const metadata = { 'Благотворительные проекты и инициативы Ориё. Мы помогаем обществу и заботимся о будущем.', }; +const events = [ + { + title: 'Благотворительный марафон', + description: + 'Ежегодный благотворительный марафон в поддержку детей с особыми потребностями.', + date: '15 июня 2023', + location: 'Парк Рудаки, Душанбе', + image: '/placeholder.svg?height=200&width=300&text=Марафон', + }, + { + title: 'Экологическая акция', + description: 'Очистка берегов реки Варзоб от мусора и посадка деревьев.', + date: '22 июля 2023', + location: 'Река Варзоб, Душанбе', + image: '/placeholder.svg?height=200&width=300&text=Экологическая+акция', + }, + { + title: 'Сбор школьных принадлежностей', + description: + 'Сбор школьных принадлежностей для детей из малообеспеченных семей к новому учебному году.', + date: '1-20 августа 2023', + location: 'Все заправки GasNetwork', + image: '/placeholder.svg?height=200&width=300&text=Школьные+принадлежности', + }, +]; + export function CharityPage() { const { t } = useTextController(); @@ -47,23 +71,17 @@ export function CharityPage() { priority />
- -
-
-
- -
-

- {t('charity.hero.title')} -

-

- {t('charity.hero.subtitle')} -

+ +
+
+
+

+ {t('charity.hero.title')} +

+

+ {t('charity.hero.subtitle')} +

@@ -72,235 +90,190 @@ export function CharityPage() { {/* Mission Section */} -
-
-
-
-
- -
-

- {t('charity.mission.title')} -

-

- {t('charity.mission.description1')} -

-

- {t('charity.mission.description2')} -

- -
- {[0, 1, 2].map((index) => ( -
- -
-

- {t(`charity.mission.principles.${index}.title`)} -

-

- {t( - `charity.mission.principles.${index}.description`, - )} -

-
-
- ))} -
-
-
- {t('charity.mission.imageAlt')} -
+
+
+
+
-
-
-
- - {/* Key Figures */} -
-
-
-

- {t('charity.stats.title')} +

+ {t('charity.mission.title')}

-

- {t('charity.stats.subtitle')} +

+ {t('charity.mission.description1')} +

+

+ {t('charity.mission.description2')}

-
-
- {[0, 1, 2].map((index) => ( -
-

- {t(`charity.stats.items.${index}.value`)} -

-

- {t(`charity.stats.items.${index}.label`)} -

-
- ))} -
-
-
- {/* Upcoming Events */} - -
-
-
-
- -
-

- {t('charity.events.title')} -

-

- {t('charity.events.subtitle')} -

-
- -
- {[ - { - title: 'Благотворительный марафон', - description: - 'Ежегодный благотворительный марафон в поддержку детей с особыми потребностями.', - date: '15 июня 2023', - location: 'Парк Рудаки, Душанбе', - image: '/placeholder.svg?height=200&width=300&text=Марафон', - }, - { - title: 'Экологическая акция', - description: - 'Очистка берегов реки Варзоб от мусора и посадка деревьев.', - date: '22 июля 2023', - location: 'Река Варзоб, Душанбе', - image: - '/placeholder.svg?height=200&width=300&text=Экологическая+акция', - }, - { - title: 'Сбор школьных принадлежностей', - description: - 'Сбор школьных принадлежностей для детей из малообеспеченных семей к новому учебному году.', - date: '1-20 августа 2023', - location: 'Все заправки Ориё', - image: - '/placeholder.svg?height=200&width=300&text=Школьные+принадлежности', - }, - ].map((event, index) => ( - + {[0, 1, 2].map((index) => ( +
+
-
- {event.title} -
- - - {event.title} - - - -

{event.description}

-
- - {event.date} -
-
- - {event.location} -
-
+

+ {t(`charity.mission.principles.${index}.title`)} +

+

+ {t(`charity.mission.principles.${index}.description`)} +

- - - - +
))}
-
+
+ {t('charity.mission.imageAlt')} +
+
+
+ + {/* Key Figures */} + +
+

+ {t('charity.stats.title')} +

+

+ {t('charity.stats.subtitle')} +

+
+
+ {[0, 1, 2].map((index) => ( +
+

+ {t(`charity.stats.items.${index}.value`)} +

+

+ {t(`charity.stats.items.${index}.label`)} +

+
+ ))} +
+
+ + {/* Upcoming Events */} + +
+
+ +
+

+ {t('charity.events.title')} +

+

+ {t('charity.events.subtitle')} +

+
+ +
+ {events.map((event, index) => ( + +
+
+ {event.title} +
+ + + {event.title} + + + +

{event.description}

+
+ + {event.date} +
+
+ + {event.location} +
+
+
+ {/* + + */} +
+ ))} +
{/* How to Help */} -
-
-
-
- -
-

- {t('charity.help.title')} -

-

- {t('charity.help.subtitle')} -

-
- -
- {[ - { - title: 'Сделать пожертвование', - description: - 'Ваше пожертвование поможет нам реализовать больше проектов и помочь большему количеству людей.', - icon: , - }, - { - title: 'Стать волонтером', - description: - 'Присоединяйтесь к нашей команде волонтеров и помогайте нам в реализации благотворительных проектов.', - icon: , - }, - { - title: 'Участвовать в мероприятиях', - description: - 'Принимайте участие в наших благотворительных мероприятиях и акциях.', - icon: , - }, - { - title: 'Распространять информацию', - description: - 'Расскажите о нашем фонде и его деятельности своим друзьям и знакомым.', - icon: , - }, - ].map((item, index) => ( - - -
- {item.icon} -
- - {item.title} - -
- -

{item.description}

-
-
- ))} -
+
+
+
-
+

+ {t('charity.help.title')} +

+

+ {t('charity.help.subtitle')} +

+
+ +
+ {[ + { + title: 'Сделать пожертвование', + description: + 'Ваше пожертвование поможет нам реализовать больше проектов и помочь большему количеству людей.', + icon: , + }, + { + title: 'Стать волонтером', + description: + 'Присоединяйтесь к нашей команде волонтеров и помогайте нам в реализации благотворительных проектов.', + icon: , + }, + { + title: 'Участвовать в мероприятиях', + description: + 'Принимайте участие в наших благотворительных мероприятиях и акциях.', + icon: , + }, + { + title: 'Распространять информацию', + description: + 'Расскажите о нашем фонде и его деятельности своим друзьям и знакомым.', + icon: , + }, + ].map((item, index) => ( + + +
{item.icon}
+ + {item.title} + +
+ +

{item.description}

+
+
+ ))} +
diff --git a/src/pages-templates/clients/certificates/index.tsx b/src/pages-templates/clients/certificates/index.tsx index 5c93793..8b6ae63 100644 --- a/src/pages-templates/clients/certificates/index.tsx +++ b/src/pages-templates/clients/certificates/index.tsx @@ -3,10 +3,10 @@ import { Download, Eye } from 'lucide-react'; import Image from 'next/image'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; import { Button } from '@/shared/shadcn-ui/button'; import { Card, CardContent } from '@/shared/shadcn-ui/card'; -import Container from '@/shared/shadcn-ui/conteiner'; export function CertificatesPage() { const { t } = useTextController(); @@ -67,8 +67,8 @@ export function CertificatesPage() { certificates.length = 0; return ( - -
+
+

{t('certificates.title')}

@@ -125,7 +125,7 @@ export function CertificatesPage() { ))}

-
- + +
); } diff --git a/src/pages-templates/clients/index.tsx b/src/pages-templates/clients/index.tsx index 96c6b7b..e230e10 100644 --- a/src/pages-templates/clients/index.tsx +++ b/src/pages-templates/clients/index.tsx @@ -2,8 +2,8 @@ import Image from 'next/image'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; -import Container from '@/shared/shadcn-ui/conteiner'; import { BenefitsSection } from '@/widgets/clients/ui/benefits-section'; import { ServicesOverviewSection } from '@/widgets/clients/ui/services-overview-section'; @@ -33,7 +33,7 @@ export function ClientsPage() { priority />
- +
- -
-
-

- {t('clients.loyalty.title')} -

-

- {t('clients.loyalty.description')} -

-
+ +
+

+ {t('clients.loyalty.title')} +

+

+ {t('clients.loyalty.description')} +

+ {/* Program Overview */} - {/* Program Overview */} -
-
-
-
-
- -
-

- {t('clients.loyalty.programm.about')} -

-

- {t('clients.loyalty.programm.about-description')} -

-

- {t('clients.loyalty.programm.about-description-2')} -

+
+
+
+ +
+

+ {t('clients.loyalty.programm.about')} +

+

+ {t('clients.loyalty.programm.about-description')} +

+

+ {t('clients.loyalty.programm.about-description-2')} +

-
-
-
- -
-
-

- {t('clients.loyalty.programm.conditions-1')} -

-

- {t( - 'clients.loyalty.programm.conditions.description-1', - )} -

-
-
-
-
- -
-
-

- {t('clients.loyalty.programm.conditions-2')} -

-

- {t( - 'clients.loyalty.programm.conditions.description-2', - )} -

-
-
-
-
- -
-
-

- {t('clients.loyalty.programm.conditions-3')} -

-

- {t( - 'clients.loyalty.programm.conditions.description-3', - )} -

-
-
+
+
+
+ +
+
+

+ {t('clients.loyalty.programm.conditions-1')} +

+

+ {t('clients.loyalty.programm.conditions.description-1')} +

-
- Программа лояльности +
+
+ +
+
+

+ {t('clients.loyalty.programm.conditions-2')} +

+

+ {t('clients.loyalty.programm.conditions.description-2')} +

+
+
+
+
+ +
+
+

+ {t('clients.loyalty.programm.conditions-3')} +

+

+ {t('clients.loyalty.programm.conditions.description-3')} +

+
-
+
+ Программа лояльности +
+
+
- {/* How It Works */} -
-
-
-

- {t('clients.loyalty.works.title')} -

-

- {t('clients.loyalty.works.description')} + {/* How It Works */} +

+ +
+

+ {t('clients.loyalty.works.title')} +

+

+ {t('clients.loyalty.works.description')} +

+
+
+
+
+ 1 +
+

+ {t('clients.loyalty.works.stage-1')} +

+

+ {t('clients.loyalty.works.stage.description-1')}

- -
-
-
- 1 -
-

- {t('clients.loyalty.works.stage-1')} -

-

- {t('clients.loyalty.works.stage.description-1')} -

+
+
+ 2
-
-
- 2 -
-

- {t('clients.loyalty.works.stage-2')} -

-

- {t('clients.loyalty.works.stage.description-2')} -

-
-
-
- 3 -
-

- {t('clients.loyalty.works.stage-3')} -

-

- {t('clients.loyalty.works.stage.description-3')} -

-
-
-
- 4 -
-

- {t('clients.loyalty.works.stage-4')} -

-

- {t('clients.loyalty.works.stage.description-4')} -

-
-
-
-
- - {/* Loyalty Levels */} -
-
-
-

- {t('clients.loyalty.works.levels.title')} -

-

- {t('clients.loyalty.works.levels.description')} +

+ {t('clients.loyalty.works.stage-2')} +

+

+ {t('clients.loyalty.works.stage.description-2')}

- -
- - -

- {t('clients.loyalty.works.levels.card-1.title')} -

-
- - {t('clients.loyalty.works.levels.card-1.percent')} - -

- {t('clients.loyalty.works.levels.card.mark')} -

-
-
    -
  • - - - {t('clients.loyalty.works.levels.card-1.bonus-1')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-1.bonus-2')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-1.bonus-3')} - -
  • -
-
-
- - - -

- {t('clients.loyalty.works.levels.card-2.title')} -

-
- - {t('clients.loyalty.works.levels.card-2.percent')} - -

- {t('clients.loyalty.works.levels.card.mark')} -

-
-
    -
  • - - - {t('clients.loyalty.works.levels.card-2.bonus-1')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-2.bonus-2')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-2.bonus-3')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-2.bonus-4')} - -
  • -
-
-
- - - -

- {t('clients.loyalty.works.levels.card-3.title')} -

-
- - {t('clients.loyalty.works.levels.card-3.percent')} - -

- {t('clients.loyalty.works.levels.card.mark')} -

-
-
    -
  • - - - {t('clients.loyalty.works.levels.card-3.bonus-1')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-3.bonus-2')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-3.bonus-3')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-3.bonus-4')} - -
  • -
  • - - - {t('clients.loyalty.works.levels.card-3.bonus-5')} - -
  • -
-
-
+
+
+ 3 +
+

+ {t('clients.loyalty.works.stage-3')} +

+

+ {t('clients.loyalty.works.stage.description-3')} +

+
+
+
+ 4 +
+

+ {t('clients.loyalty.works.stage-4')} +

+

+ {t('clients.loyalty.works.stage.description-4')} +

-
+ +
+ + {/* Loyalty Levels */} + +
+

+ {t('clients.loyalty.works.levels.title')} +

+

+ {t('clients.loyalty.works.levels.description')} +

+
+ +
+ + +

+ {t('clients.loyalty.works.levels.card-1.title')} +

+
+ + {t('clients.loyalty.works.levels.card-1.percent')} + +

+ {t('clients.loyalty.works.levels.card.mark')} +

+
+
    +
  • + + + {t('clients.loyalty.works.levels.card-1.bonus-1')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-1.bonus-2')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-1.bonus-3')} + +
  • +
+
+
+ + + +

+ {t('clients.loyalty.works.levels.card-2.title')} +

+
+ + {t('clients.loyalty.works.levels.card-2.percent')} + +

+ {t('clients.loyalty.works.levels.card.mark')} +

+
+
    +
  • + + + {t('clients.loyalty.works.levels.card-2.bonus-1')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-2.bonus-2')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-2.bonus-3')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-2.bonus-4')} + +
  • +
+
+
+ + + +

+ {t('clients.loyalty.works.levels.card-3.title')} +

+
+ + {t('clients.loyalty.works.levels.card-3.percent')} + +

+ {t('clients.loyalty.works.levels.card.mark')} +

+
+
    +
  • + + + {t('clients.loyalty.works.levels.card-3.bonus-1')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-3.bonus-2')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-3.bonus-3')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-3.bonus-4')} + +
  • +
  • + + + {t('clients.loyalty.works.levels.card-3.bonus-5')} + +
  • +
+
+
+
diff --git a/src/pages-templates/login/index.tsx b/src/pages-templates/login/index.tsx index 8b30644..9086aab 100644 --- a/src/pages-templates/login/index.tsx +++ b/src/pages-templates/login/index.tsx @@ -8,6 +8,7 @@ import { Suspense } from 'react'; import { LoginForm } from '@/features/auth/login-form'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; import { Button } from '@/shared/shadcn-ui/button'; import { @@ -17,7 +18,6 @@ import { CardHeader, CardTitle, } from '@/shared/shadcn-ui/card'; -import Container from '@/shared/shadcn-ui/conteiner'; import { Tabs, TabsContent, @@ -134,40 +134,35 @@ export default function LoginPage() { const { t } = useTextController(); return ( - -
-
-
-
-
- -
-

- {t('auth.title')} -

-

{t('auth.description')}

+
+
+ +
+
+
+

+ {t('auth.title')} +

+

{t('auth.description')}

+
-
- - - +
+ + + -
-

- {t('auth.loginIssues')}{' '} - - {t('auth.contactLink')} - -

-
+
+

+ {t('auth.loginIssues')}{' '} + + {t('auth.contactLink')} + +

-
+
- +
); } diff --git a/src/shared/components/container.tsx b/src/shared/components/container.tsx new file mode 100644 index 0000000..8e73e5b --- /dev/null +++ b/src/shared/components/container.tsx @@ -0,0 +1,18 @@ +'use client'; + +import { ComponentProps } from 'react'; + +import { cn } from '../lib/utils'; + +interface ContainerProps extends ComponentProps<'div'> {} + +export function Container({ children, className, ...props }: ContainerProps) { + return ( +
+ {children} +
+ ); +} diff --git a/src/shared/shadcn-ui/conteiner.tsx b/src/shared/shadcn-ui/conteiner.tsx deleted file mode 100644 index 43ea538..0000000 --- a/src/shared/shadcn-ui/conteiner.tsx +++ /dev/null @@ -1,10 +0,0 @@ -"use client" - -interface ContainerProps { - children: React.ReactNode -} -export default function Container({children}: ContainerProps) { - return ( -
{children}
- ) -} \ No newline at end of file diff --git a/src/widgets/about-section.tsx b/src/widgets/about-section.tsx index 56681cb..bdb3368 100644 --- a/src/widgets/about-section.tsx +++ b/src/widgets/about-section.tsx @@ -4,14 +4,15 @@ import { Users } from 'lucide-react'; import Image from 'next/image'; import AboutCounter from '@/shared/components/about-counter'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; export const AboutSection = () => { const { t } = useTextController(); return ( -
-
+
+
@@ -38,7 +39,7 @@ export const AboutSection = () => { />
-
+
); }; diff --git a/src/widgets/charity-section.tsx b/src/widgets/charity-section.tsx index 056a1d2..af9d502 100644 --- a/src/widgets/charity-section.tsx +++ b/src/widgets/charity-section.tsx @@ -4,6 +4,7 @@ import { ChevronRight, Heart } from 'lucide-react'; import Image from 'next/image'; import Link from 'next/link'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; import { Button } from '@/shared/shadcn-ui/button'; @@ -11,8 +12,8 @@ export const CharitySection = () => { const { t } = useTextController(); return ( -
-
+
+
{
-
+
); }; diff --git a/src/widgets/clients/ui/benefits-section.tsx b/src/widgets/clients/ui/benefits-section.tsx index 2fa88b0..b539939 100644 --- a/src/widgets/clients/ui/benefits-section.tsx +++ b/src/widgets/clients/ui/benefits-section.tsx @@ -3,8 +3,8 @@ import { Percent } from 'lucide-react'; import Image from 'next/image'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; -import Container from '@/shared/shadcn-ui/conteiner'; interface Benefit { title: string; @@ -34,55 +34,52 @@ export const BenefitsSection = () => { const { t } = useTextController(); return ( - -
-
-
-
-
- -
-

- {t('clients.benefits.title')} -

-

- {t('clients.benefits.subtitle')} -

- -
- {benefits.map(({ title, description }) => { - return ( -
-
- -
-
-

{title}

-

{description}

-
-
- ); - })} -
+
+ +
+
+
+
-
- Преимущества для клиентов +

+ {t('clients.benefits.title')} +

+

+ {t('clients.benefits.subtitle')} +

+
+ {benefits.map(({ title, description }) => { + return ( +
+
+ +
+
+

{title}

+

{description}

+
+
+ ); + })}
+
+ Преимущества для клиентов +
-
- + +
); }; diff --git a/src/widgets/clients/ui/services-overview-section.tsx b/src/widgets/clients/ui/services-overview-section.tsx index faa7e4f..401c0ee 100644 --- a/src/widgets/clients/ui/services-overview-section.tsx +++ b/src/widgets/clients/ui/services-overview-section.tsx @@ -3,6 +3,7 @@ import { CreditCard, type LucideProps, Percent, Wallet } from 'lucide-react'; import { type ForwardRefExoticComponent, type RefAttributes } from 'react'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; import { Card, @@ -11,7 +12,6 @@ import { CardHeader, CardTitle, } from '@/shared/shadcn-ui/card'; -import Container from '@/shared/shadcn-ui/conteiner'; interface ServiceOverview { title: string; @@ -50,41 +50,42 @@ export const ServicesOverviewSection = () => { const { t } = useTextController(); return ( - -
-
-
-

- {t('clients.services.title')} -

-

- {t('clients.services.subtitle')} -

-
- -
- {servicesOverview.map(({ description, Icon, contentText, title }) => { - return ( - - -
- -
- {title} - {description} -
- -

{contentText}

-
-
- ); - })} -
+
+ +
+

+ {t('clients.services.title')} +

+

+ {t('clients.services.subtitle')} +

-
- +
+ {servicesOverview.map(({ description, Icon, contentText, title }) => { + return ( + + +
+ +
+ {title} + {description} +
+ +

{contentText}

+
+
+ ); + })} +
+ +
); }; diff --git a/src/widgets/cta-section.tsx b/src/widgets/cta-section.tsx index 2da2761..0dd263f 100644 --- a/src/widgets/cta-section.tsx +++ b/src/widgets/cta-section.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; import { Button } from '@/shared/shadcn-ui/button'; @@ -9,8 +10,8 @@ export const CtaSection = () => { const { t } = useTextController(); return ( -
-
+
+

{t('home.cta.title')} @@ -24,7 +25,7 @@ export const CtaSection = () => {

-
+
); }; diff --git a/src/widgets/map-section.tsx b/src/widgets/map-section.tsx index 656d2c6..1176227 100644 --- a/src/widgets/map-section.tsx +++ b/src/widgets/map-section.tsx @@ -6,6 +6,7 @@ import { Stations } from '@/app/api-utlities/@types'; import { GasStationMap } from '@/features/map'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; interface MapSectionProps { @@ -16,8 +17,8 @@ export const MapSection = ({ stations }: MapSectionProps) => { const { t } = useTextController(); return ( -
-
+
+
@@ -35,7 +36,7 @@ export const MapSection = ({ stations }: MapSectionProps) => { >
-
+
); }; diff --git a/src/widgets/promotions-section.tsx b/src/widgets/promotions-section.tsx index e0d0268..de661ab 100644 --- a/src/widgets/promotions-section.tsx +++ b/src/widgets/promotions-section.tsx @@ -4,6 +4,7 @@ import { Gift } from 'lucide-react'; import { Discounts } from '@/app/api-utlities/@types/index'; +import { Container } from '@/shared/components/container'; import PromotionSlider from '@/shared/components/promotion-slider'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; @@ -15,8 +16,8 @@ export const PromotionsSection = ({ discounts }: PromotionsSectionProps) => { const { t } = useTextController(); return ( -
-
+
+
@@ -29,7 +30,7 @@ export const PromotionsSection = ({ discounts }: PromotionsSectionProps) => {

-
+
); }; diff --git a/src/widgets/stats-section.tsx b/src/widgets/stats-section.tsx index 1c47423..f63db3f 100644 --- a/src/widgets/stats-section.tsx +++ b/src/widgets/stats-section.tsx @@ -2,6 +2,7 @@ import { useEffect, useRef, useState } from 'react'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; import AnimatedCounter from '../shared/components/animated-counter'; @@ -36,11 +37,8 @@ export function StatsSection() { }, []); return ( -
-
+
+

@@ -67,7 +65,7 @@ export function StatsSection() {

{t('home.stats.mode')}

-
+
); } diff --git a/src/widgets/vacancies-section.tsx b/src/widgets/vacancies-section.tsx index 0e48e98..186b894 100644 --- a/src/widgets/vacancies-section.tsx +++ b/src/widgets/vacancies-section.tsx @@ -4,6 +4,7 @@ import { Briefcase } from 'lucide-react'; import { Jobs } from '@/app/api-utlities/@types/index'; +import { Container } from '@/shared/components/container'; import { useTextController } from '@/shared/language/hooks/use-text-controller'; import { cn } from '@/shared/lib/utils'; import { Badge } from '@/shared/shadcn-ui/badge'; @@ -37,8 +38,8 @@ export const VacanciesSection = ({ jobs }: VacanciesSectionProps) => { const jobsTabsTitle = [allVacancies, ...Array.from(jobsByType.keys())]; return ( -
-
+
+
@@ -88,7 +89,7 @@ export const VacanciesSection = ({ jobs }: VacanciesSectionProps) => { ))} -
+
); };