feat: add more details to product tile

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-06-12 19:14:57 +07:00
parent 4edc2bb580
commit 8f82f6299e
10 changed files with 77 additions and 48 deletions

View File

@@ -51,7 +51,7 @@ export function normalizeUrl(domain: string, url: string) {
export const parseMetaFieldValue = <T>(field: { value: string } | null): T | null => {
try {
return JSON.parse(field?.value || '{}');
return field?.value ? JSON.parse(field.value) : null;
} catch (error) {
return null;
}