refactor: update imports to use 'type' for TypeScript types and enhance tooltip functionality

This commit is contained in:
2024-12-31 20:27:49 +01:00
parent 8e37da9463
commit 3d082d3092
14 changed files with 367 additions and 101 deletions
+20 -14
View File
@@ -21,14 +21,17 @@ export async function GET() {
});
} catch (error) {
console.error("Error fetching data:", error);
return Response.json({
error: {
message: "Failed to fetch data",
return Response.json(
{
error: {
message: "Failed to fetch data",
},
},
}, {
status: 500,
headers: { "Content-Type": "application/json" },
});
{
status: 500,
headers: { "Content-Type": "application/json" },
},
);
}
}
@@ -43,13 +46,16 @@ export async function POST(req: Request) {
});
} catch (error) {
console.error("Error adding data:", error);
return Response.json({
error: {
message: "Failed to add data",
return Response.json(
{
error: {
message: "Failed to add data",
},
},
}, {
status: 500,
headers: { "Content-Type": "application/json" },
});
{
status: 500,
headers: { "Content-Type": "application/json" },
},
);
}
}