mirror of
https://github.com/get-drexa/drive.git
synced 2025-11-30 21:41:39 +00:00
22 lines
451 B
TypeScript
22 lines
451 B
TypeScript
import type { OpenedFile } from "@fileone/convex/filesystem"
|
|
import { ImagePreviewDialog } from "./image-preview-dialog"
|
|
|
|
export function FilePreviewDialog({
|
|
openedFile,
|
|
onClose,
|
|
}: {
|
|
openedFile: OpenedFile
|
|
onClose: () => void
|
|
}) {
|
|
switch (openedFile.file.mimeType) {
|
|
case "image/jpeg":
|
|
case "image/png":
|
|
case "image/gif":
|
|
return (
|
|
<ImagePreviewDialog openedFile={openedFile} onClose={onClose} />
|
|
)
|
|
default:
|
|
return null
|
|
}
|
|
}
|