{execs.map((exec) => (
@@ -10,7 +20,7 @@ function ExecScreen({ execs }: Props) {
diff --git a/web/src/utils/mapToExec.ts b/web/src/utils/mapToExec.ts
new file mode 100644
index 00000000..6a879d2a
--- /dev/null
+++ b/web/src/utils/mapToExec.ts
@@ -0,0 +1,16 @@
+import { Exec } from "../types/types";
+
+export const mapToExec = (data: any): Exec[] => {
+ return data.data.map((item: any) => {
+ const attributes = item.attributes || {};
+ const imageUrl = attributes.image?.data?.attributes?.url || "";
+
+ return {
+ id: item.id,
+ name: attributes.name || "",
+ bio: attributes.bio || "",
+ position: attributes.position || "",
+ image: imageUrl,
+ };
+ });
+};
diff --git a/web/tsconfig.json b/web/tsconfig.json
index f15b6a65..bf7f36c2 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -5,7 +5,7 @@
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
- "types": ["vitest/globals"],
+ "types": ["vitest/globals", "node"],
"paths": {
"@utils/*": ["./src/utils/*"],
diff --git a/web/yarn.lock b/web/yarn.lock
index 3cec006a..074efa12 100644
--- a/web/yarn.lock
+++ b/web/yarn.lock
@@ -718,6 +718,13 @@
resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz"
integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
+"@types/node@^20.14.2":
+ version "20.14.2"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18"
+ integrity sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==
+ dependencies:
+ undici-types "~5.26.4"
+
"@types/prop-types@*":
version "15.7.11"
resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz"
@@ -2942,6 +2949,11 @@ ufo@^1.5.3:
resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344"
integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==
+undici-types@~5.26.4:
+ version "5.26.5"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
+ integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
+
universal-cookie@^7.0.2:
version "7.0.2"
resolved "https://registry.npmjs.org/universal-cookie/-/universal-cookie-7.0.2.tgz"