From 649cef6fb1e61a4503a913aa84087aa38ab2bc3b Mon Sep 17 00:00:00 2001 From: popovspiridon99 Date: Mon, 30 Mar 2026 17:54:22 +0900 Subject: [PATCH] upd --- src/App.tsx | 39 +++++++++++++++++++++++++++++- src/components/AboutSection.tsx | 12 ++++----- src/components/CaseSection.tsx | 6 ++--- src/components/Footer.tsx | 6 ++--- src/components/Navbar.tsx | 6 ++--- src/components/ProductsSection.tsx | 7 +++--- src/components/ServicesSection.tsx | 8 +++--- 7 files changed, 61 insertions(+), 23 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 05331b5..120bfda 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { useEffect, useState } from 'react' import { motion, useMotionValueEvent, useScroll } from "motion/react" import TypingEffect from './components/TypingEffect' import CardsSection from './components/CardsSection' @@ -15,6 +15,28 @@ import DirectorSection from './components/DirectorSection' import DiscussSection from './components/DiscussSection' function App() { + const [policyAccepted, setPolicyAccepted] = useState(false); + + // Check localStorage on component mount + useEffect(() => { + const storedValue = localStorage.getItem('policyAccepted'); + + if (storedValue === null) { + // Key doesn't exist, set to false + setPolicyAccepted(false); + localStorage.setItem('policyAccepted', 'false'); + } else { + // Key exists, parse the value + setPolicyAccepted(storedValue === 'true'); + } + }, []); + + // Handle policy acceptance + const acceptPolicy = (): void => { + setPolicyAccepted(true); + localStorage.setItem('policyAccepted', 'true'); + }; + const { scrollY } = useScroll() const [hidden, setHidden] = useState(false) const [isAtTop, setIsAtTop] = useState(true) @@ -67,6 +89,21 @@ function App() { return (
+ {!policyAccepted && +
+
+
+ Мы обрабатываем персональные данные в соответствии с требованиями Федерального закона №152-ФЗ «О персональных данных». Отправляя формы на сайте, вы даёте согласие на обработку ваших персональных данных (ФИО, номер телефона, адрес электронной почты и иные сведения, указанные вами) для связи с вами и обработки запроса. + Также сайт использует файлы веб-куки и сервисы веб-аналитики для обеспечения корректной работы и улучшения пользовательского опыта. Данные будут храниться в течение 12 месяцев. Вы можете отозвать своё согласие в любой момент. Подробнее — в нашей Политике обработки персональных данных. +
+
+ +
+
+
} +
diff --git a/src/components/AboutSection.tsx b/src/components/AboutSection.tsx index 2747be2..62dad50 100644 --- a/src/components/AboutSection.tsx +++ b/src/components/AboutSection.tsx @@ -14,7 +14,7 @@ const AboutSection = () => { { icon: - + , title: 'Техническое сопровождение', @@ -24,7 +24,7 @@ const AboutSection = () => { icon: - + , title: 'ИТ-консалтинг', @@ -102,8 +102,8 @@ const AboutSection = () => {
Виды деятельности:
- {actInfo.map(info => ( - + {actInfo.map((info, index) => ( + ))}
@@ -112,8 +112,8 @@ const AboutSection = () => {
Почему мы?
- {whyInfo.map(info => ( - + {whyInfo.map((info, index) => ( + ))}
diff --git a/src/components/CaseSection.tsx b/src/components/CaseSection.tsx index 8596982..4fe1170 100644 --- a/src/components/CaseSection.tsx +++ b/src/components/CaseSection.tsx @@ -49,7 +49,7 @@ const CaseSection = () => { - +
@@ -62,8 +62,8 @@ const CaseSection = () => {
Выполненные работы:
- {done.map(text => ( - + {done.map((text, index) => ( + ))}
diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 89e94c7..1ab778d 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -48,12 +48,12 @@ const Footer = () => { + fillOpacity="0.05"> - - + + diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 7b78801..028d0e4 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -19,9 +19,9 @@ const Navbar = () => { } }}> - - - + + +
diff --git a/src/components/ProductsSection.tsx b/src/components/ProductsSection.tsx index 21de4a6..e068777 100644 --- a/src/components/ProductsSection.tsx +++ b/src/components/ProductsSection.tsx @@ -63,8 +63,9 @@ const ProductsSection = () => {
- {products.map(product => ( + {products.map((product, index) => ( { {product.title}
- {product.descriptions.map(description => ( -
+ {product.descriptions.map((description, index) => ( +
diff --git a/src/components/ServicesSection.tsx b/src/components/ServicesSection.tsx index e9528b2..1b164c1 100644 --- a/src/components/ServicesSection.tsx +++ b/src/components/ServicesSection.tsx @@ -33,8 +33,8 @@ const ServiceItem = ({ service }: { className='col-span-1 text-5xl lg:text-8xl leading-12 lg:leading-20 text-blue-500 lg:text-base-content/10 lg:group-hover:text-blue-500 transition-colors'>{service.id} {service.title}
- {service.descriptions.map(desc => ( -
+ {service.descriptions.map((desc, index) => ( +
@@ -114,8 +114,8 @@ const ServicesSection = () => {
- {services.map(service => ( - + {services.map((service, index) => ( + ))}