[st frontend] 첨부 까지 해서 저장함
This commit is contained in:
@@ -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)}>
|
||||
|
||||
Reference in New Issue
Block a user