feat: render findings first iteration

This commit is contained in:
Pablo Lara
2024-10-22 11:07:00 +02:00
parent af267fede4
commit 9a9a6410e1
8 changed files with 107 additions and 131 deletions
+12
View File
@@ -1,5 +1,17 @@
import { MetaDataProps } from "@/types";
// Helper function to create dictionaries by type
export const createDict = (
type: string,
data: any,
includedField: string = "included",
) =>
Object.fromEntries(
data[includedField]
.filter((item: { type: string }) => item.type === type)
.map((item: { id: string }) => [item.id, item]),
);
export const parseStringify = (value: any) => JSON.parse(JSON.stringify(value));
export const convertFileToUrl = (file: File) => URL.createObjectURL(file);
+1 -1
View File
@@ -1,2 +1,2 @@
export * from "./custom";
export * from "./helper";
export * from "./utils";