Refactor code structure for improved readability and maintainability

This commit is contained in:
Batyr 2025-11-05 21:28:15 +05:00
parent 1ed58ab0be
commit 520f6a1887
11 changed files with 110 additions and 146 deletions

1
dist/assets/index-CbuGwFnz.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
dist/index.html vendored
View File

@ -66,10 +66,10 @@
})(window, document, "script", "dataLayer", "GTM-NK394LVK");
</script>
<title>Turkmen Textile</title>
<script type="module" crossorigin src="/assets/index-rv813nAg.js"></script>
<script type="module" crossorigin src="/assets/index-CbuGwFnz.js"></script>
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CE_Ks92h.js">
<link rel="modulepreload" crossorigin href="/assets/ui-library-BrObeRNz.js">
<link rel="stylesheet" crossorigin href="/assets/index-B3sbgI_5.css">
<link rel="modulepreload" crossorigin href="/assets/ui-library-CmNMJV57.js">
<link rel="stylesheet" crossorigin href="/assets/index-cmK67VWD.css">
</head>
<body>
<div id="root"></div>

View File

@ -7,7 +7,7 @@ interface Props {
export const Logo: FC<Props> = ({ className }) => {
return (
<div className={cn("h-16 w-auto", className)}>
<div className={cn("md:h-16 h-10 w-auto", className)}>
<img src="/logo.svg" alt="logo" className="size-full object-cover" />
</div>
);

View File

@ -23,7 +23,7 @@ const buttonVariants = cva(
size: {
default: "h-12 px-5 py-2 rounded-[2px]",
sm: "h-10 text-base px-4 rounded-[2px]",
lg: "lg:h-[88px] h-12 rounded-[2px] px-8 ",
lg: "lg:h-[88px] h-12 rounded-[2px] px-8",
icon: "h-9 w-9",
},
},

View File

@ -4,15 +4,13 @@ import i18n from "./i18n";
import { useLangStore } from "./store/lang";
const LanguageSync = () => {
// Подписываемся на изменение языка из zustand
const lang = useLangStore((state) => state.lang);
useEffect(() => {
// Когда язык изменился, обновляем i18next
i18n.changeLanguage(lang);
}, [lang]);
return null; // Компонент ничего не рендерит
return null;
};
export default LanguageSync;

View File

@ -1,38 +1,101 @@
// {
// "text": "Fashion shows",
// "hover": true,
// "hoverItems": [
// {
// "text": "Foreign designers",
// "link": "/impressions"
// },
// {
// "text": "Turkmen designers",
// "link": ""
// }
// ]
// }
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/l.jpg",
// "link": ""
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
// "link": "/impressions"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng1.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/m.jpg",
// "link": ""
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
// "link": "/impressions"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg",
// "link": "/impressions-tm"
// },
// {
// "text": "Master classes",
// "hover": true,
// "hoverItems": [
// {
// "text": "For designers",
// "link": "/impressions"
// },
// {
// "text": "For visitors",
// "link": ""
// }
// ]
// }
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/s.jpg",
// "link": ""
// },
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/Turkmen%20Designers/en/L%20Eng.png",
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/International%20Designers/Eng.png"
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
// "link": "/impressions"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg",
// "link": "/impressions-tm"
// },
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/Turkmen%20Designers/en/M%20Eng.png",
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/International%20Designers/Eng.png"
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/l.jpg",
// "link": ""
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
// "link": "/impressions"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg",
// "link": "/impressions-tm"
// },
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/Turkmen%20Designers/en/S%20Eng.png",
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/International%20Designers/Eng.png"
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/m.jpg",
// "link": ""
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
// "link": "/impressions"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/s.jpg",
// "link": ""
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
// "link": "/impressions"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg",
// "link": "/impressions-tm"
// },
// {
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg",
// "link": "/impressions-tm"
// },

View File

@ -1,70 +1,21 @@
{
"banners": {
"lg": [
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/l.jpg",
"link": ""
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
"link": "/impressions"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng1.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/05112025/EN_l.jpg",
"link": ""
"link": "/stend-form"
}
],
"md": [
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/m.jpg",
"link": ""
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
"link": "/impressions"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/05112025/EN_m.jpg",
"link": ""
"link": "/stend-form"
}
],
"sm": [
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/s.jpg",
"link": ""
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
"link": "/impressions"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_eng2.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/05112025/EN_s.jpg",
"link": ""
"link": "/stend-form"
}
]
},

View File

@ -1,69 +1,21 @@
{
"banners": {
"lg": [
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/l.jpg",
"link": ""
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
"link": "/impressions"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/05112025/RUS_l.jpg",
"link": ""
"link": "/stend-form"
}
],
"md": [
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/m.jpg",
"link": ""
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
"link": "/impressions"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/05112025/RUS_m.jpg",
"link": ""
"link": "/stend-form"
}
],
"sm": [
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/s.jpg",
"link": ""
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
"link": "/impressions"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru1.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/web_ru2.jpg",
"link": "/impressions-tm"
},
{
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/05112025/RUS_s.jpg",
"link": ""
"link": "/stend-form"
}
]
},