Refactor code structure for improved readability and maintainability
This commit is contained in:
Binary file not shown.
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
/* eslint-disable @next/next/no-img-element */
|
/* eslint-disable @next/next/no-img-element */
|
||||||
import { fluxgore, gothampro } from "@/utils/fonts";
|
import { fluxgore, gothampro } from "@/utils/fonts";
|
||||||
import Button from "./Button";
|
import Button from "./Button";
|
||||||
@@ -22,7 +23,7 @@ function EventCard(props: EventCardProps) {
|
|||||||
if (props.link.startsWith("http")) {
|
if (props.link.startsWith("http")) {
|
||||||
window.open(props.link, "_blank");
|
window.open(props.link, "_blank");
|
||||||
} else {
|
} else {
|
||||||
router.push(props.link);
|
window.open(props.link, "_blank");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -142,9 +143,7 @@ function Events() {
|
|||||||
</p>
|
</p>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<p>
|
<p>В воскресенье, 7 сентября, пройдет дрифт-гонка.</p>
|
||||||
Во второй день фестиваля, 8 сентября, пройдет дрифт-гонка.
|
|
||||||
</p>
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -172,7 +171,7 @@ function Events() {
|
|||||||
description={
|
description={
|
||||||
<>
|
<>
|
||||||
<p>
|
<p>
|
||||||
...Уникальные машины, дрифт-кары, кастом и тюнинг — в одном
|
Уникальные машины, дрифт-кары, кастом и тюнинг — в одном
|
||||||
месте. От ретро до hi-tech, от stance до muscle. Приходи
|
месте. От ретро до hi-tech, от stance до muscle. Приходи
|
||||||
посмотреть, сфотографировать и пообщаться с владельцами.
|
посмотреть, сфотографировать и пообщаться с владельцами.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
+14
-14
@@ -58,7 +58,7 @@ function Footer() {
|
|||||||
</svg>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
{/* <li>
|
||||||
<Link
|
<Link
|
||||||
href="https://www.youtube.com/@mossportonline9438"
|
href="https://www.youtube.com/@mossportonline9438"
|
||||||
target="_blank"
|
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" />
|
<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>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li> */}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -91,18 +91,18 @@ function Footer() {
|
|||||||
>
|
>
|
||||||
YUKA Drive Fest
|
YUKA Drive Fest
|
||||||
</button>
|
</button>
|
||||||
<Link
|
<button
|
||||||
href="/#cover"
|
onClick={() => scrollToElement("exhibition")}
|
||||||
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200`}
|
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")}
|
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`}
|
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
|
<button
|
||||||
onClick={() => scrollToElement("moscow_fight")}
|
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`}
|
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>
|
</button>
|
||||||
<Link
|
{/* <Link
|
||||||
href="/#program"
|
href="/#program"
|
||||||
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200`}
|
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200`}
|
||||||
>
|
>
|
||||||
Программа
|
Программа
|
||||||
</Link>
|
</Link> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -141,12 +141,12 @@ function Footer() {
|
|||||||
УЧАСТИЕ
|
УЧАСТИЕ
|
||||||
</h3>
|
</h3>
|
||||||
<div className="flex flex-col space-y-2">
|
<div className="flex flex-col space-y-2">
|
||||||
<Link
|
<button
|
||||||
href="/#registration"
|
onClick={() => scrollToElement("events")}
|
||||||
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200`}
|
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("partners")}
|
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`}
|
className={`${gothampro.className} text-sm md:text-base text-[#E6E6E6] opacity-60 hover:text-blue-500 transition-colors duration-200 text-left`}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ function Info() {
|
|||||||
|
|
||||||
<div className="flex-col max-w-10/12">
|
<div className="flex-col max-w-10/12">
|
||||||
<p className="text-white text-base md:text-4xl font-normal">
|
<p className="text-white text-base md:text-4xl font-normal">
|
||||||
Организованный Департаментом спорта Москвы и РАФ, он объединяет
|
Организованный Департаментом спорта города Москвы и РАФ, он объединяет
|
||||||
фанатов скорости и семьи.
|
фанатов скорости и семьи.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,7 +25,14 @@ function Map() {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="flex flex-col justify-end flex-grow mt-6 lg:mt-10">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ function Navbar() {
|
|||||||
</svg>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
{/* <li>
|
||||||
<Link
|
<Link
|
||||||
href="https://www.youtube.com/@mossportonline9438"
|
href="https://www.youtube.com/@mossportonline9438"
|
||||||
target="_blank"
|
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" />
|
<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>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li> */}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{/* Mobile Menu Button */}
|
{/* 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" />
|
<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>
|
</svg>
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
{/* <Link
|
||||||
href="https://www.youtube.com/@mossportonline9438"
|
href="https://www.youtube.com/@mossportonline9438"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
@@ -207,7 +207,7 @@ function Navbar() {
|
|||||||
<svg className="w-5 h-5 fill-black" viewBox="0 0 24 24">
|
<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" />
|
<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>
|
</svg>
|
||||||
</Link>
|
</Link> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user