From 8ea9a4b503ecadd6f27d9519516afa040a541732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogumi=C5=82?= <47248711+milewskibogumil@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:14:13 +0200 Subject: [PATCH] changed button to cta name --- .../cta.module.scss} | 0 .../ui/{button/button.tsx => cta/cta.tsx} | 2 +- .../components/ui/{button => cta}/index.astro | 2 +- .../components/ui/{button => cta}/index.ts | 2 +- apps/astro/src/pages/index.astro | 20 ------------------- apps/sanity/schema/ui/{button.tsx => cta.tsx} | 4 ++-- apps/sanity/structure/schema-types.ts | 4 ++-- 7 files changed, 7 insertions(+), 27 deletions(-) rename apps/astro/src/components/ui/{button/button.module.scss => cta/cta.module.scss} (100%) rename apps/astro/src/components/ui/{button/button.tsx => cta/cta.tsx} (95%) rename apps/astro/src/components/ui/{button => cta}/index.astro (93%) rename apps/astro/src/components/ui/{button => cta}/index.ts (85%) rename apps/sanity/schema/ui/{button.tsx => cta.tsx} (98%) diff --git a/apps/astro/src/components/ui/button/button.module.scss b/apps/astro/src/components/ui/cta/cta.module.scss similarity index 100% rename from apps/astro/src/components/ui/button/button.module.scss rename to apps/astro/src/components/ui/cta/cta.module.scss diff --git a/apps/astro/src/components/ui/button/button.tsx b/apps/astro/src/components/ui/cta/cta.tsx similarity index 95% rename from apps/astro/src/components/ui/button/button.tsx rename to apps/astro/src/components/ui/cta/cta.tsx index 5a4e896..62054c9 100644 --- a/apps/astro/src/components/ui/button/button.tsx +++ b/apps/astro/src/components/ui/cta/cta.tsx @@ -1,5 +1,5 @@ import type { ImageDataProps } from '../image'; -import styles from './button.module.scss' +import styles from './cta.module.scss' export type Props = React.HTMLAttributes & React.ButtonHTMLAttributes & { text?: string | React.ReactNode diff --git a/apps/astro/src/components/ui/button/index.astro b/apps/astro/src/components/ui/cta/index.astro similarity index 93% rename from apps/astro/src/components/ui/button/index.astro rename to apps/astro/src/components/ui/cta/index.astro index 652e7b6..6f60893 100644 --- a/apps/astro/src/components/ui/button/index.astro +++ b/apps/astro/src/components/ui/cta/index.astro @@ -1,6 +1,6 @@ --- import Image from '@/components/ui/image' -import Button, { type Props as ButtonDataProps } from './button' +import Button, { type Props as ButtonDataProps } from './cta' type Props = ButtonDataProps diff --git a/apps/astro/src/components/ui/button/index.ts b/apps/astro/src/components/ui/cta/index.ts similarity index 85% rename from apps/astro/src/components/ui/button/index.ts rename to apps/astro/src/components/ui/cta/index.ts index 950a8d8..df48b2b 100644 --- a/apps/astro/src/components/ui/button/index.ts +++ b/apps/astro/src/components/ui/cta/index.ts @@ -1,6 +1,6 @@ import { ImageDataQuery } from '../image'; export { default } from './index.astro'; -export { type Props as ButtonDataProps } from './button'; +export { type Props as ButtonDataProps } from './cta'; export const ButtonDataQuery = (name: string) => ` ${name} { diff --git a/apps/astro/src/pages/index.astro b/apps/astro/src/pages/index.astro index 2565b60..e84c211 100644 --- a/apps/astro/src/pages/index.astro +++ b/apps/astro/src/pages/index.astro @@ -1,22 +1,8 @@ --- import Layout from '@/src/layouts/Layout.astro' import metadataFetch from '@/utils/metadata.fetch' -import sanityFetch from '@/utils/sanity.fetch' -import Button, { ButtonDataQuery, type ButtonDataProps } from '@/components/ui/button' const metadata = await metadataFetch('Index_Page') - -type QueryProps = { - button: ButtonDataProps -} - -const data = await sanityFetch({ - query: ` - *[_type == "Index_Page"][0] { - ${ButtonDataQuery('button')} - } - `, -}) --- @@ -32,12 +18,6 @@ const data = await sanityFetch({ magni qui deleniti ducimus. Quam accusamus eos id fugiat soluta corrupti modi maiores ab perspiciatis? Asperiores, sunt aliquam rerum ipsum magnam perferendis vero sapiente id sint unde dolor adipisci repudiandae.

- -
- -