Skip to content

Commit

Permalink
remove calltoactionsection
Browse files Browse the repository at this point in the history
  • Loading branch information
anemne committed Dec 20, 2024
1 parent e1e9390 commit b1b0b77
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 199 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ The `Company Information` menu allows you to configure global settings for your
### Pages

- **Creating Pages**: Content editors can create and manage pages under the `Pages` menu in the Sanity Studio.
- **Adding Sections**: Each page can be customized with structured content that includes various predefined sections such as hero, article, features, callToAction and grid.
- **Adding Sections**: Each page can be customized with structured content that includes various predefined sections such as hero, article, features and grid.

## Development

Expand Down
29 changes: 0 additions & 29 deletions src/components/sections/callToAction/CallToAction.tsx

This file was deleted.

37 changes: 0 additions & 37 deletions src/components/sections/callToAction/CallToActionPreview.tsx

This file was deleted.

41 changes: 0 additions & 41 deletions src/components/sections/callToAction/callToAction.module.css

This file was deleted.

26 changes: 0 additions & 26 deletions src/utils/renderSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { QueryResponseInitial } from "@sanity/react-loader";

import Article from "src/components/sections/article/Article";
import ArticlePreview from "src/components/sections/article/ArticlePreview";
import CallToAction from "src/components/sections/callToAction/CallToAction";
import CallToActionPreview from "src/components/sections/callToAction/CallToActionPreview";
import CompensationCalculator from "src/components/sections/compensation-calculator/CompensationCalculator";
import ContactBox from "src/components/sections/contact-box/ContactBox";
import CustomerCasesEntry from "src/components/sections/customerCasesEntry/CustomerCasesEntry";
Expand All @@ -26,7 +24,6 @@ import Openness from "src/components/sections/openness/Openness";
import { Locale } from "src/i18n/routing";
import {
ArticleSection,
CallToActionSection,
CustomerCasesEntrySection,
GridSection,
HeroSection,
Expand Down Expand Up @@ -90,22 +87,6 @@ const renderArticleSection = (
);
};

const renderCallToActionSection = (
section: CallToActionSection,
sectionIndex: number,
isDraftMode: boolean,
initialData: QueryResponseInitial<PageBuilder>,
) => {
return isDraftMode ? (
<CallToActionPreview
initialData={initialData}
sectionIndex={sectionIndex}
/>
) : (
<CallToAction callToAction={section} />
);
};

const renderImageSection = (
section: ImageSection,
sectionIndex: number,
Expand Down Expand Up @@ -200,13 +181,6 @@ const SectionRenderer = ({
isDraftMode,
initialData,
);
case "ctaSection":
return renderCallToActionSection(
section,
sectionIndex,
isDraftMode,
initialData,
);
case "imageSection":
return renderImageSection(
section,
Expand Down
8 changes: 0 additions & 8 deletions studio/lib/interfaces/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ export interface ArticleSection {
imageExtended: ImageExtendedProps;
}

export interface CallToActionSection {
_type: "ctaSection";
_key: string;
basicTitle?: string;
callToActions?: ILink[];
}

export interface ImageSection {
_type: "imageSection";
_key: string;
Expand Down Expand Up @@ -175,7 +168,6 @@ export type Section =
| HeroSection
| LogoSaladSection
| ArticleSection
| CallToActionSection
| ImageSection
| ImageSplitSection
| GridSection
Expand Down
7 changes: 0 additions & 7 deletions studio/lib/queries/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ const SECTIONS_FRAGMENT = groq`
...,
"image": image {${INTERNATIONALIZED_IMAGE_FRAGMENT}},
},
_type == "ctaSection" => {
...,
callToActions[] {
...,
${TRANSLATED_LINK_FRAGMENT}
}
},
_type == "compensationCalculator" => {
...,
"moduleTitle": ${translatedFieldFragment("moduleTitle")},
Expand Down
2 changes: 0 additions & 2 deletions studio/schemas/documents/pageBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ const pageBuilder = defineType({
hero,
logoSalad,
article,
// callToAction,
// testimonals,
imageSplitSection,
imageSection,
// grid,
Expand Down
48 changes: 0 additions & 48 deletions studio/schemas/objects/sections/callToAction.ts

This file was deleted.

0 comments on commit b1b0b77

Please sign in to comment.