Make descriptions nullable

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-11-05 16:48:58 +01:00
parent 637f097cc6
commit 288c59a5f2
60 changed files with 311 additions and 375 deletions

View File

@@ -32,7 +32,7 @@ export type TrustCenterReferenceDialogRef = {
openEdit: (reference: {
id: string;
name: string;
description: string;
description?: string | null;
websiteUrl: string;
rank: number;
}) => void;
@@ -41,7 +41,7 @@ export type TrustCenterReferenceDialogRef = {
type Reference = {
id: string;
name: string;
description: string;
description?: string | null;
websiteUrl: string;
rank: number;
};
@@ -90,7 +90,7 @@ export const TrustCenterReferenceDialog = forwardRef<TrustCenterReferenceDialogR
setUploadedFile(null);
reset({
name: reference.name,
description: reference.description,
description: reference.description ?? undefined,
websiteUrl: reference.websiteUrl,
rank: reference.rank,
});
@@ -116,7 +116,7 @@ export const TrustCenterReferenceDialog = forwardRef<TrustCenterReferenceDialogR
input: {
trustCenterId,
name: data.name,
description: data.description,
description: data.description || null,
websiteUrl: data.websiteUrl,
logoFile: null,
},
@@ -135,14 +135,14 @@ export const TrustCenterReferenceDialog = forwardRef<TrustCenterReferenceDialogR
const input: {
id: string;
name: string;
description: string;
description: string | null;
websiteUrl: string;
rank?: number;
logoFile?: null;
} = {
id: editReference.id,
name: data.name,
description: data.description,
description: data.description || null,
websiteUrl: data.websiteUrl,
};

View File

@@ -30,7 +30,7 @@ type Props = {
type Reference = {
id: string;
name: string;
description: string;
description?: string | null;
websiteUrl: string;
logoUrl: string;
rank: number;