Skip to content

Commit

Permalink
feat(customerCase): remove root rich text field
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiazom committed Oct 17, 2024
1 parent e2b5c09 commit ccd2fe5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions studioShared/lib/interfaces/customerCases.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { PortableTextBlock } from "sanity";

import { IImage } from "studio/lib/interfaces/media";

export interface CustomerCaseProjectInfo {
Expand All @@ -21,6 +19,5 @@ export interface CustomerCaseBase {

export interface CustomerCase extends CustomerCaseBase {
image: IImage;
richText: PortableTextBlock[];
projectInfo: CustomerCaseProjectInfo;
}
1 change: 0 additions & 1 deletion studioShared/lib/queries/customerCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const CUSTOMER_CASE_QUERY = groq`
"image": image {
${INTERNATIONALIZED_IMAGE_FRAGMENT}
},
"richText": ${translatedFieldFragment("richText")},
"projectInfo": projectInfo {
customer,
"name": ${translatedFieldFragment("name")},
Expand Down
7 changes: 1 addition & 6 deletions studioShared/schemas/documents/customerCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineField, defineType } from "sanity";

import { isInternationalizedString } from "studio/lib/interfaces/global";
import { internationalizedImage } from "studio/schemas/fields/media";
import { richTextID, titleID } from "studio/schemas/fields/text";
import { titleID } from "studio/schemas/fields/text";
import { titleSlug } from "studio/schemas/schemaTypes/slug";
import { firstTranslation } from "studio/utils/i18n";
import { customerCaseProjectInfo } from "studioShared/schemas/fields/customerCaseProjectInfo";
Expand Down Expand Up @@ -51,11 +51,6 @@ const customerCase = defineType({
type: "array",
of: [richTextBlock, imageBlock, listBlock],
}),
defineField({
name: richTextID,
title: "Body",
type: "internationalizedArrayRichText",
}),
],
preview: {
select: {
Expand Down

0 comments on commit ccd2fe5

Please sign in to comment.