chore: attachment 인터페이스 수정
This commit is contained in:
@@ -48,22 +48,17 @@ export const createColumns = (
|
||||
{
|
||||
id: "atflCd",
|
||||
cell: ({ row }) => {
|
||||
const atflCd = row.original.atflCd;
|
||||
return (
|
||||
<ThumbImage
|
||||
atflCd={atflCd}
|
||||
pstNo={row.original.pstNo}
|
||||
thumbRefs={thumbRefs}
|
||||
/>
|
||||
);
|
||||
const { atflCd, pstNo } = row.original;
|
||||
return <ThumbImage atflCd={atflCd} pstNo={pstNo} thumbRefs={thumbRefs} />;
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "rgtrNm",
|
||||
cell: ({ row }) => {
|
||||
const { rgtrNm } = row.original;
|
||||
return (
|
||||
<span className="text-[1.4rem] font-bold text-label">{rgtrNm}</span>
|
||||
<span className="text-[1.4rem] font-bold text-label">
|
||||
{row.original.rgtrNm}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@ function WithPreviewFileUploader<T extends PostFormData | PostUpdateFormData>({
|
||||
if (atflId) {
|
||||
let imageUrl = "";
|
||||
if (bbsInfo?.bbsTypeCd === "BBSIMAGE") {
|
||||
imageUrl = await AttachmentApi.getImageUrl(atflId);
|
||||
imageUrl = await AttachmentApi.getImageUrlByAtflId(atflId);
|
||||
}
|
||||
if (bbsInfo?.bbsTypeCd === "BBSMOVIE") {
|
||||
imageUrl = await AttachmentApi.getMovieThumbnailUrl(atflId);
|
||||
@@ -85,7 +85,7 @@ function WithPreviewFileUploader<T extends PostFormData | PostUpdateFormData>({
|
||||
useEffect(() => {
|
||||
if (!attachmentData || attachmentData.length === 0) return;
|
||||
(async () => {
|
||||
const imageUrl = await AttachmentApi.getImageUrl(
|
||||
const imageUrl = await AttachmentApi.getImageUrlByAtflId(
|
||||
attachmentData[0]?.atflId as string,
|
||||
);
|
||||
setThumbnailUrl(imageUrl);
|
||||
@@ -95,7 +95,7 @@ function WithPreviewFileUploader<T extends PostFormData | PostUpdateFormData>({
|
||||
return (
|
||||
<FileUploader
|
||||
id="atflCd"
|
||||
className="!h-auto !max-w-none flex-col !items-start gap-4"
|
||||
className="!h-auto !max-w-none flex-col !items-start gap-4 [&_.file-uploader-label]:h-[3.2rem]"
|
||||
accept={fileAccept(bbsInfo?.bbsTypeCd as BbsType)}
|
||||
onUpload={onUpload}
|
||||
customPreview={
|
||||
|
||||
Reference in New Issue
Block a user