Refactor code structure for improved readability and maintainability

This commit is contained in:
2025-08-14 12:46:59 +05:00
parent 42056a2bf4
commit 408c216528
6 changed files with 31 additions and 25 deletions
Binary file not shown.
+4 -5
View File
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @next/next/no-img-element */
import { fluxgore, gothampro } from "@/utils/fonts";
import Button from "./Button";
@@ -22,7 +23,7 @@ function EventCard(props: EventCardProps) {
if (props.link.startsWith("http")) {
window.open(props.link, "_blank");
} else {
router.push(props.link);
window.open(props.link, "_blank");
}
}
};
@@ -142,9 +143,7 @@ function Events() {
</p>
<br />
<p>
Во второй день фестиваля, 8 сентября, пройдет дрифт-гонка.
</p>
<p>В воскресенье, 7 сентября, пройдет дрифт-гонка.</p>
<br />
<p>
@@ -172,7 +171,7 @@ function Events() {
description={
<>
<p>
...Уникальные машины, дрифт-кары, кастом и тюнинг в одном
Уникальные машины, дрифт-кары, кастом и тюнинг в одном
месте. От ретро до hi-tech, от stance до muscle. Приходи
посмотреть, сфотографировать и пообщаться с владельцами.
</p>
+14 -14
View File
@@ -58,7 +58,7 @@ function Footer() {
</svg>
</Link>
</li>
<li>
{/* <li>
<Link
href="https://www.youtube.com/@mossportonline9438"
target="_blank"
@@ -72,7 +72,7 @@ function Footer() {
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" />
</svg>
</Link>
</li>
</li> */}
</ul>
</div>
@@ -91,18 +91,18 @@ function Footer() {
>
YUKA Drive Fest
</button>
<Link
href="/#cover"
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200`}
<button
onClick={() => scrollToElement("exhibition")}
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200 text-left`}
>
ЭКСПО
</Link>
<button
</button>
{/* <button
onClick={() => scrollToElement("moto")}
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200 text-left`}
>
Мотокросс
</button>
</button> */}
<button
onClick={() => scrollToElement("moscow_fight")}
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200 text-left`}
@@ -125,12 +125,12 @@ function Footer() {
>
О фестивале
</button>
<Link
{/* <Link
href="/#program"
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200`}
>
Программа
</Link>
</Link> */}
</div>
</div>
@@ -141,12 +141,12 @@ function Footer() {
УЧАСТИЕ
</h3>
<div className="flex flex-col space-y-2">
<Link
href="/#registration"
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200`}
<button
onClick={() => scrollToElement("events")}
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200 text-left`}
>
Регистрация
</Link>
</button>
<button
onClick={() => scrollToElement("partners")}
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200 text-left`}
+1 -1
View File
@@ -88,7 +88,7 @@ function Info() {
<div className="flex-col max-w-10/12">
<p className="text-white text-base md:text-4xl font-normal">
Организованный Департаментом спорта Москвы и РАФ, он объединяет
Организованный Департаментом спорта города Москвы и РАФ, он объединяет
фанатов скорости и семьи.
</p>
</div>
+8 -1
View File
@@ -25,7 +25,14 @@ function Map() {
</p>
<div className="flex flex-col justify-end flex-grow mt-6 lg:mt-10">
<Button shadowEnabled={false}>схема проезда</Button>
<Button
onClick={() => {
window.open("/СХЕМА ПРОЕЗДА-1.pdf", "_blank");
}}
shadowEnabled={false}
>
схема проезда
</Button>
</div>
</div>
+4 -4
View File
@@ -85,7 +85,7 @@ function Navbar() {
</svg>
</Link>
</li>
<li>
{/* <li>
<Link
href="https://www.youtube.com/@mossportonline9438"
target="_blank"
@@ -99,7 +99,7 @@ function Navbar() {
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" />
</svg>
</Link>
</li>
</li> */}
</ul>
{/* Mobile Menu Button */}
@@ -198,7 +198,7 @@ function Navbar() {
<path d="M15.684 0H8.316C1.592 0 0 1.592 0 8.316v7.368C0 22.408 1.592 24 8.316 24h7.368C22.408 24 24 22.408 24 15.684V8.316C24 1.592 22.408 0 15.684 0zm3.692 17.123h-1.744c-.66 0-.864-.525-2.05-1.71-1.033-1.001-1.49-.996-1.701-.996-.346 0-.444.097-.444.574v1.563c0 .422-.135.678-1.253.678-1.846 0-3.896-1.118-5.335-3.202C4.624 10.857 4.03 8.57 4.03 8.096c0-.21.097-.405.574-.405h1.744c.428 0 .59.194.756.648.83 2.405 2.229 4.506 2.807 4.506.213 0 .31-.097.31-.632V9.98c-.062-1.438-.84-1.563-.84-2.077 0-.17.135-.34.359-.34h2.744c.359 0 .487.194.487.632v3.473c0 .359.159.487.259.487.213 0 .383-.128.773-.518 1.205-1.315 2.067-3.34 2.067-3.34.118-.248.311-.485.73-.485h1.744c.523 0 .634.27.523.632-.24.749-2.42 4.062-2.42 4.062-.194.31-.259.446 0 .747.194.226 1.116.96 1.394 1.315.757.973.525 1.528.157 1.528z" />
</svg>
</Link>
<Link
{/* <Link
href="https://www.youtube.com/@mossportonline9438"
target="_blank"
rel="noopener noreferrer"
@@ -207,7 +207,7 @@ function Navbar() {
<svg className="w-5 h-5 fill-black" viewBox="0 0 24 24">
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" />
</svg>
</Link>
</Link> */}
</div>
</div>
</div>