From 88b246d3660589dc677acba837cea0601f98b2a8 Mon Sep 17 00:00:00 2001 From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com> Date: Fri, 16 Feb 2024 08:43:28 +0400 Subject: [PATCH] Remove 'prod.astro' and make image component properties optional The 'prod.astro' page is deleted as a part of refactoring process. Also, title, src, alt, and url properties of ImgSmall and ImgWide components are now optional, which provides greater flexibility and reduces risk of errors when these components are used in various parts of application. --- src/components/ui/images/ImgSmall.astro | 8 +- src/components/ui/images/ImgWide.astro | 8 +- src/pages/prod.astro | 302 ------------------------ 3 files changed, 8 insertions(+), 310 deletions(-) delete mode 100644 src/pages/prod.astro diff --git a/src/components/ui/images/ImgSmall.astro b/src/components/ui/images/ImgSmall.astro index 7c02644..ed3f0e3 100644 --- a/src/components/ui/images/ImgSmall.astro +++ b/src/components/ui/images/ImgSmall.astro @@ -3,10 +3,10 @@ import { Image } from "astro:assets"; const { title, src, alt, url } = Astro.props; interface Props { - title: string; - src: any; - alt: string; - url: string; + title?: string; + src?: any; + alt?: string; + url?: string; } import type { CollectionEntry } from "astro:content"; diff --git a/src/components/ui/images/ImgWide.astro b/src/components/ui/images/ImgWide.astro index 2f5a06a..7a58e42 100644 --- a/src/components/ui/images/ImgWide.astro +++ b/src/components/ui/images/ImgWide.astro @@ -3,10 +3,10 @@ import { Image } from "astro:assets"; const { title, src, alt, url } = Astro.props; interface Props { - title: string; - src: any; - alt: string; - url: string; + title?: string; + src?: any; + alt?: string; + url?: string; } import type { CollectionEntry } from "astro:content"; diff --git a/src/pages/prod.astro b/src/pages/prod.astro deleted file mode 100644 index 03891d7..0000000 --- a/src/pages/prod.astro +++ /dev/null @@ -1,302 +0,0 @@ ---- -// Import section components -import MainLayout from "../layouts/MainLayout.astro"; -import productData from "../content/products/b203.md"; -import ProductTabBtn from "../components/ui/buttons/ProductTabBtn.astro"; -import PrimaryCTA from "../components/ui/buttons/PrimaryCTA.astro"; - -declare global { - interface Window { - gsap: any; - } -} -import { Image } from "astro:assets"; ---- - - -
-
- -
-
-

- {productData.main.content} -

-
-
-
-

- {productData.main.title} -

-

- {productData.main.subTitle} -

-
-
- {productData.main.imgAlt} -
-
-
- - -
- - - - -
-
-
-
-
-

- {productData.description.title} -

-

- {productData.description.subTitle} -

-

- -

-
- - -
- - { - productData.descriptionList.map((list) => ( -
-
-

- {list.title} -

-

- {list.subTitle} -

-
-
- )) - } -
-
-
-
- - - -
-
- - - - - - - -