diff --git a/src/app/(app)/community/new/page.tsx b/src/app/(app)/community/new/page.tsx index f91968a..3383793 100644 --- a/src/app/(app)/community/new/page.tsx +++ b/src/app/(app)/community/new/page.tsx @@ -276,6 +276,7 @@ export default function CommunityNewPage() { content: text.trim(), mediaList: uploaded.map((m, i) => ({ url: m.url, + thumbnailUrl: m.thumbnailUrl, mediaType: m.mediaType, sortOrder: i, placeId: mediaPlaces[i]?.placeId ?? null, diff --git a/src/lib/api/posts.ts b/src/lib/api/posts.ts index 1717535..25a98a3 100644 --- a/src/lib/api/posts.ts +++ b/src/lib/api/posts.ts @@ -14,6 +14,8 @@ type FeedParams = { type UploadedMedia = { url: string; + /** 목록용 축소본. 서버가 만들지 못했으면 null 이고, 이때 화면은 원본을 쓴다 */ + thumbnailUrl: string | null; mediaType: "IMAGE" | "VIDEO"; }; diff --git a/src/types/api/post.ts b/src/types/api/post.ts index 7ff43e3..96358cb 100644 --- a/src/types/api/post.ts +++ b/src/types/api/post.ts @@ -6,6 +6,8 @@ export type PostAuthor = { export type PostMedia = { url: string; + /** 목록용 축소본. 없으면 화면이 url 을 쓴다 */ + thumbnailUrl?: string | null; mediaType: "IMAGE" | "VIDEO"; sortOrder: number; placeId: number | null;