[st frontend] 첨부 까지 해서 저장함

This commit is contained in:
2026-05-29 15:57:30 +09:00
parent b5eea1a476
commit d3ca402e4a
2 changed files with 83 additions and 23 deletions
+7 -1
View File
@@ -1,4 +1,5 @@
import React from "react";
import { formatFileSize } from "@/shared/lib/file-utils";
type EtcFile = {
id: string;
@@ -52,7 +53,12 @@ export function EtcAttachments({ etcFiles, etcUploading, onFilesChange, onDelete
<tr key={f.id}>
<td className="pr-2">{f.name}</td>
<td className="text-center">{f.ext}</td>
<td className="text-right">{f.size}</td>
<td className="text-right">{(() => {
const raw = f.size;
if (typeof raw === "number") return formatFileSize(raw);
const s = String(raw ?? "").trim();
return /^[0-9]+$/.test(s) ? formatFileSize(Number(s)) : s;
})()}</td>
<td className="text-center">{f.uploader}</td>
<td className="text-center">
<button className="cnfm-btn-delete" onClick={() => onDelete(f.id, f.atflId)}>