Refactor About section to use static data: Replaced dynamic content fetching with hardcoded values for title and image URLs, simplifying the component structure and improving loading performance.
This commit is contained in:
@ -1,18 +1,15 @@
|
|||||||
---
|
---
|
||||||
import { sanityClient } from "sanity:client";
|
// Статичные данные для раздела О НАС
|
||||||
|
const about = {
|
||||||
const about = await sanityClient.fetch(`*[_type == "about"][0]{
|
title: "О НАС",
|
||||||
title,
|
paragraph1: "Наша компания занимается производством продукции из драгоценных металлов.",
|
||||||
paragraph1,
|
imageUrls: [
|
||||||
paragraph2,
|
"/images/hero.webp",
|
||||||
paragraph3,
|
"/images/hero.webp",
|
||||||
paragraph4,
|
"/images/hero.webp",
|
||||||
paragraph5,
|
"/images/hero.webp"
|
||||||
paragraph6,
|
]
|
||||||
paragraph7,
|
};
|
||||||
paragraph8,
|
|
||||||
"imageUrls": images[].asset->url
|
|
||||||
}`);
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<section
|
<section
|
||||||
@ -35,13 +32,6 @@ const about = await sanityClient.fetch(`*[_type == "about"][0]{
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="text-lg lg:text-xl text-gray-300 leading-relaxed font-gilroy">
|
<div class="text-lg lg:text-xl text-gray-300 leading-relaxed font-gilroy">
|
||||||
<p class="text-2xl text-white font-semibold mb-4">{about.paragraph1}</p>
|
<p class="text-2xl text-white font-semibold mb-4">{about.paragraph1}</p>
|
||||||
<p class="mb-3">{about.paragraph2}</p>
|
|
||||||
<p class="mb-3">{about.paragraph3}</p>
|
|
||||||
<p class="mb-3">{about.paragraph4}</p>
|
|
||||||
<p class="mb-3">{about.paragraph5}</p>
|
|
||||||
<p class="mb-3">{about.paragraph6}</p>
|
|
||||||
<p class="mb-3">{about.paragraph7}</p>
|
|
||||||
<p>{about.paragraph8}</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Блок быстрых ссылок -->
|
<!-- Блок быстрых ссылок -->
|
||||||
|
Reference in New Issue
Block a user