diff --git a/src/components/Devices.tsx b/src/components/Devices.tsx
index 4982142..1f1be79 100644
--- a/src/components/Devices.tsx
+++ b/src/components/Devices.tsx
@@ -3,7 +3,7 @@ import { devices } from '../consts/devices';
import { IDevice } from '../types/IDevice';
import { Title } from './ui/Title';
import { useEffect, useRef, useState } from 'react';
-import { useHover } from 'usehooks-ts';
+import { useHover, useOnClickOutside } from 'usehooks-ts';
import { ChevronUpIcon } from './icons/ChevronUpIcon';
import { ChevronDownIcon } from './icons/ChevronDownIcon';
@@ -57,6 +57,7 @@ function DesktopDevice({
? (root.current?.clientHeight ?? 0) + descriptionHeight + 24
: 112,
}}
+ transition={{ delay: 0.3 }}
>
{title}
@@ -86,7 +87,7 @@ function DesktopDevice({
initial={{ opacity: 0, y: 500 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 100 }}
- transition={{ duration: 0.5 }}
+ transition={{ duration: 0.5, delay: 0.3 }}
/>
)}
@@ -97,13 +98,13 @@ function DesktopDevice({
function Device({ title, description, img }: IDevice) {
const [expanded, setExpanded] = useState(false);
+ const [descriptionHeight, setDescriptionHeight] = useState(0);
+ const [imgHeight, setImgHeight] = useState(0);
+
const root = useRef
(null);
const descriptionRef = useRef(null);
const imgRef = useRef(null);
- const [descriptionHeight, setDescriptionHeight] = useState(0);
- const [imgHeight, setImgHeight] = useState(0);
-
useEffect(() => {
if (!imgRef.current) return;
imgRef.current!.onload = () =>
@@ -114,6 +115,8 @@ function Device({ title, description, img }: IDevice) {
setDescriptionHeight(descriptionRef.current?.clientHeight ?? 0);
}, [descriptionRef, expanded]);
+ useOnClickOutside(root, () => setExpanded(false));
+
return (
+
С помощью интерактивных инструментов создаем систему{' '}
diff --git a/src/components/Layout/Footer.tsx b/src/components/Layout/Footer.tsx
index fa76ac5..ca04eed 100644
--- a/src/components/Layout/Footer.tsx
+++ b/src/components/Layout/Footer.tsx
@@ -9,12 +9,15 @@ export function Footer() {
-
- Политика конфиденциальности
graff.tech
-
+
+
+ Политика конфиденциальности
+
+ graff.tech
+
© 2024 GRAFF interactive. Все права защищены
diff --git a/src/components/Layout/Header.tsx b/src/components/Layout/Header.tsx
index eb17e14..631533b 100644
--- a/src/components/Layout/Header.tsx
+++ b/src/components/Layout/Header.tsx
@@ -24,7 +24,7 @@ export function Header() {
);
return (
-
+
} className="h-8 lg:h-10" />
@@ -34,8 +34,8 @@ export function Header() {