このコミットが含まれているのは:
2026-07-14 20:03:11 +09:00
コミット b0c24f319a
11個のファイルの変更849行の追加716行の削除
+17 -8
ファイルの表示
@@ -81,12 +81,10 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
const counts = useMemo (() => reviewSummaryCounts (rows), [rows])
const processable = useMemo (
() => processableImportRows (rows),
[rows],
)
[rows])
const creatable = useMemo (
() => creatableImportRows (rows),
[rows],
)
[rows])
const reviewRows =
session?.repairMode === 'failed'
? [...rows].sort ((a, b) => {
@@ -126,8 +124,7 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
['originalCreatedFrom', draft.originalCreatedFrom],
['originalCreatedBefore', draft.originalCreatedBefore],
['duration', draft.duration],
['parentPostIds', draft.parentPostIds],
] as const
['parentPostIds', draft.parentPostIds]] as const
draftFields.forEach (([field, value]) => {
nextAttributes[field] = value
nextProvenance[field] =
@@ -284,6 +281,7 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
invalidCount={counts.invalid}
processableCount={processable.length}
creatableCount={creatable.length}
skipPlannedCount={counts.skipPlanned}
onBack={() => navigate ('/posts/import')}
onSubmit={submit}/>
@@ -300,11 +298,18 @@ const PostImportReviewPage: FC<Props> = ({ user }) => {
}
const PostImportFooter = (
{ loading, invalidCount, processableCount, creatableCount, onBack, onSubmit }: {
{ loading,
invalidCount,
processableCount,
creatableCount,
skipPlannedCount,
onBack,
onSubmit }: {
loading: boolean
invalidCount: number
processableCount: number
creatableCount: number
skipPlannedCount: number
onBack: () => void
onSubmit: () => void },
) => (
@@ -315,7 +320,11 @@ const PostImportFooter = (
md:items-center md:justify-between">
<div className="flex flex-wrap items-center gap-2 text-sm">
<PostImportStatusBadge value="pending"/>
<span> {processableCount} </span>
<PostImportStatusBadge value="ready"/>
<span> {creatableCount} </span>
<PostImportStatusBadge value="skipped"/>
<span> {skipPlannedCount} </span>
<PostImportStatusBadge value="error"/>
<span> {invalidCount} </span>
</div>
@@ -327,7 +336,7 @@ const PostImportFooter = (
type="button"
onClick={onSubmit}
disabled={loading || processableCount === 0}>
稿
</Button>
</div>
</div>