完善案例库最终验证修正
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import type { FormEvent } from "react";
|
||||
import type { Dispatch, FormEvent, SetStateAction } from "react";
|
||||
|
||||
import type { PublishPlatform } from "../lib/domain/types";
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface ArticleInputPayload {
|
||||
interface ArticleInputFormProps {
|
||||
value: ArticleInputPayload;
|
||||
isSubmitting: boolean;
|
||||
onChange: (value: ArticleInputPayload) => void;
|
||||
onChange: Dispatch<SetStateAction<ArticleInputPayload>>;
|
||||
onSubmit: () => void;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export function ArticleInputForm({
|
||||
key: K,
|
||||
nextValue: ArticleInputPayload[K],
|
||||
) {
|
||||
onChange({ ...value, [key]: nextValue });
|
||||
onChange((current) => ({ ...current, [key]: nextValue }));
|
||||
}
|
||||
|
||||
function handleSubmit(event: FormEvent<HTMLFormElement>) {
|
||||
|
||||
@@ -65,7 +65,7 @@ export interface ArticleCaseInputPayload {
|
||||
fact_card?: unknown;
|
||||
}
|
||||
|
||||
export interface HumanCopyCaseInputPayload extends CopyOptimizationRequest {}
|
||||
export type HumanCopyCaseInputPayload = CopyOptimizationRequest;
|
||||
|
||||
export interface ArticleResultVersionPayload {
|
||||
article: OptimizedArticle;
|
||||
@@ -73,7 +73,7 @@ export interface ArticleResultVersionPayload {
|
||||
export_paths: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface HumanCopyResultVersionPayload extends CopyOptimizationResult {}
|
||||
export type HumanCopyResultVersionPayload = CopyOptimizationResult;
|
||||
|
||||
export interface OptimizationResultVersion {
|
||||
id: string;
|
||||
|
||||
@@ -7,8 +7,6 @@ import type {
|
||||
} from "../calibration/types";
|
||||
import type {
|
||||
CaseInput,
|
||||
CaseListFilters,
|
||||
CaseMetadataPatch,
|
||||
OptimizationCase,
|
||||
OptimizationCaseStatus,
|
||||
OptimizationCaseType,
|
||||
|
||||
Reference in New Issue
Block a user