게시판 등록시간 수정

This commit is contained in:
Macbook
2026-05-29 15:34:59 +09:00
parent 03441337f2
commit c95732c09b
13 changed files with 129 additions and 66 deletions
@@ -10,20 +10,12 @@ import {
updateVerificationIssueComment,
type VerificationIssueCommentDto,
} from '../../utils/verificationBoardApi';
import { formatIsoDateTime } from '../../utils/timezone';
interface Props {
issueId: number;
}
function formatDateTime(iso?: string): string {
if (!iso) return '';
try {
return new Date(iso).toLocaleString('ko-KR', {
month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit',
});
} catch { return ''; }
}
function defaultAuthorName(): string {
const session = getAuthSession();
if (session?.displayName) return session.displayName;
@@ -142,7 +134,7 @@ const VerificationIssueCommentsSection: React.FC<Props> = ({ issueId }) => {
<div className="vbd-comment-head">
<span className="vbd-comment-author">{c.authorName ?? '익명'}</span>
<span className="vbd-comment-date">
{formatDateTime(c.updatedAt ?? c.createdAt)}
{formatIsoDateTime(c.updatedAt ?? c.createdAt, undefined, 'short')}
{c.updatedAt && c.createdAt && c.updatedAt !== c.createdAt && ' (수정됨)'}
</span>
<div className="vbd-comment-actions">
@@ -11,6 +11,7 @@ import {
import ReproductionPathInput from './ReproductionPathInput';
import VerificationIssueCommentsSection from './VerificationIssueCommentsSection';
import VerificationIssueAttachmentsSection from './VerificationIssueAttachmentsSection';
import { formatIsoDateTime } from '../../utils/timezone';
interface Props {
issue: VerificationIssueDto | null;
@@ -23,13 +24,6 @@ interface Props {
) => void | Promise<void>;
}
function formatDateTime(iso?: string): string {
if (!iso) return '—';
try {
return new Date(iso).toLocaleString('ko-KR');
} catch { return iso; }
}
const VerificationIssueDetailPanel: React.FC<Props> = ({
issue,
attachmentsRefreshKey = 0,
@@ -137,8 +131,8 @@ const VerificationIssueDetailPanel: React.FC<Props> = ({
</div>
<div className="vbd-detail-meta">
<span> {formatDateTime(issue.createdAt)}</span>
<span> {formatDateTime(issue.updatedAt)}</span>
<span> {formatIsoDateTime(issue.createdAt)}</span>
<span> {formatIsoDateTime(issue.updatedAt)}</span>
</div>
<label className="vbd-field">
@@ -10,6 +10,7 @@ import {
type VerificationIssueStage,
} from '../../utils/verificationBoardStages';
import VerificationStageIcon from './VerificationStageIcon';
import { formatIsoDateTime } from '../../utils/timezone';
interface Props {
issues: VerificationIssueDto[];
@@ -21,16 +22,6 @@ interface Props {
onSelect: (issue: VerificationIssueDto) => void;
}
function formatDate(iso?: string): string {
if (!iso) return '';
try {
const d = new Date(iso);
return d.toLocaleString('ko-KR', {
month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit',
});
} catch { return ''; }
}
const VerificationIssueListPanel: React.FC<Props> = ({
issues,
selectedId,
@@ -102,7 +93,7 @@ const VerificationIssueListPanel: React.FC<Props> = ({
>
{stageLabel(issue.stage)}
</span>
<span className="vbd-list-meta">{formatDate(issue.updatedAt ?? issue.createdAt)}</span>
<span className="vbd-list-meta">{formatIsoDateTime(issue.updatedAt ?? issue.createdAt, undefined, 'short')}</span>
</span>
<span className="vbd-list-title">{issue.title}</span>
</span>