);
diff --git a/docs/components/sanity/external-image.tsx b/docs/components/sanity/external-image.tsx
index 107d1f1ae..53c047b54 100644
--- a/docs/components/sanity/external-image.tsx
+++ b/docs/components/sanity/external-image.tsx
@@ -12,15 +12,16 @@ export const ExternalImage = ({ value, className }: ExternalImageProps) => {
const { imageUrl, alt } = value;
return (
-
-
-
-
+
+
);
};
diff --git a/docs/components/sanity/image.tsx b/docs/components/sanity/image.tsx
index 630a8a78c..97660dc2c 100644
--- a/docs/components/sanity/image.tsx
+++ b/docs/components/sanity/image.tsx
@@ -34,7 +34,7 @@ export const SanityImage = ({ value, className }: ImageProps) => {
diff --git a/docs/components/sanity/sanity-content.tsx b/docs/components/sanity/sanity-content.tsx
index 60fce3472..8b524c175 100644
--- a/docs/components/sanity/sanity-content.tsx
+++ b/docs/components/sanity/sanity-content.tsx
@@ -4,13 +4,14 @@ import { PortableText } from "@portabletext/react";
import type { SanityDocument } from "next-sanity";
import { client } from "./client";
+import { ImageTextHalfPreview } from "@/components/sanity/image-text-half";
import { useEffect, useState } from "react";
import ErrorBoundary from "../error-boundary";
-import { PortableImage } from "./image";
-import { Table } from "./table";
-import { ImageTextHalfPreview } from "@/components/sanity/image-text-half";
import { DoDont } from "./do-dont";
import { ExternalImage } from "./external-image";
+import { PortableImage } from "./image";
+import { Table } from "./table";
+
interface SanityGuidelineProps {
title: string;
}
diff --git a/docs/sanity/schemaTypes/doDontType.tsx b/docs/sanity/schemaTypes/doDontType.tsx
index 7d5b1b61d..0d9878ad9 100644
--- a/docs/sanity/schemaTypes/doDontType.tsx
+++ b/docs/sanity/schemaTypes/doDontType.tsx
@@ -20,6 +20,11 @@ export const doDontSectionType = defineType({
validation: (Rule) => Rule.required(),
},
imageFieldType, // 기존 imageFieldType 재사용
+ {
+ name: "title",
+ title: "제목",
+ type: "string",
+ },
{
name: "description",
title: "설명",
@@ -50,9 +55,21 @@ export const doDontType = defineArrayMember({
secondType: "second.type",
firstImage: "first.imageField.uploadImage",
firstUrl: "first.imageField.externalUrl",
+ firstTitle: "first.title",
+ firstDescription: "first.description",
firstImageType: "first.imageField.imageType",
+ secondTitle: "second.title",
+ secondDescription: "second.description",
},
- prepare({ firstType, secondType, firstImage, firstUrl, firstImageType }) {
+ prepare({
+ firstType,
+ secondType,
+ firstImage,
+ firstUrl,
+ firstImageType,
+ firstTitle,
+ secondTitle,
+ }) {
const image =
firstImageType === "upload"
? firstImage
@@ -64,8 +81,11 @@ export const doDontType = defineArrayMember({
? `${firstType?.toUpperCase()} & ${secondType?.toUpperCase()}`
: firstType?.toUpperCase();
+ const subtitle = `${firstTitle} & ${secondTitle}`;
+
return {
title,
+ subtitle,
media: image,
};
},