diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 8f903fb5e9..b14438d54b 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -52,7 +52,7 @@ "@t3-oss/env-nextjs": "^0.7.1", "@types/node": "^20.10.4", "@types/react": "^18.2.45", - "@types/react-dom": "^18.2.17", + "@types/react-dom": "^18.2.18", "typescript": "^5.3.3" } } \ No newline at end of file diff --git a/apps/dashboard/src/components/attachments.tsx b/apps/dashboard/src/components/attachments.tsx index 463d7509f1..ac979e3c99 100644 --- a/apps/dashboard/src/components/attachments.tsx +++ b/apps/dashboard/src/components/attachments.tsx @@ -16,9 +16,11 @@ import { cn } from "@midday/ui/utils"; import { X } from "lucide-react"; import { useEffect, useState } from "react"; import { useDropzone } from "react-dropzone"; -import { FilePreview } from "./file-preview"; +import { FilePreview, isSupportedFilePreview } from "./file-preview"; const Item = ({ file, onDelete, id }) => { + const filePreviewSupported = isSupportedFilePreview(file.type); + return (
@@ -34,27 +36,24 @@ const Item = ({ file, onDelete, id }) => { />
- - - + {filePreviewSupported && ( + + + + )}
- - {file.name} - + {file.name} {file.size && formatSize(file.size)} diff --git a/apps/dashboard/src/components/charts/spending-list.tsx b/apps/dashboard/src/components/charts/spending-list.tsx index 0065383ce0..8fa27663d5 100644 --- a/apps/dashboard/src/components/charts/spending-list.tsx +++ b/apps/dashboard/src/components/charts/spending-list.tsx @@ -1,18 +1,21 @@ import { getSpending } from "@midday/supabase/cached-queries"; +import Link from "next/link"; import { Category } from "../category"; import { spendingData } from "./data"; import { SpendingChart } from "./spending-chart"; function SpendingCategoryList({ categories }) { return ( -