Files
yaak/src-web/components/responseViewers/ImageViewer.tsx
2024-10-09 16:27:37 -07:00

12 lines
307 B
TypeScript

import { convertFileSrc } from '@tauri-apps/api/core';
import React from 'react';
interface Props {
bodyPath: string;
}
export function ImageViewer({ bodyPath }: Props) {
const src = convertFileSrc(bodyPath);
return <img src={src} alt="Response preview" className="max-w-full max-h-full pb-2" />;
}