* [filestore] remove user files endpoints * [web] remove user files integration for filestore GitOrigin-RevId: 565fa68a659c07420ee6141d0f276b4e4d2972e0
23 lines
485 B
TypeScript
23 lines
485 B
TypeScript
import { useProjectContext } from '../../../shared/context/project-context'
|
|
import { BinaryFile } from '@/features/file-view/types/binary-file'
|
|
|
|
export default function FileViewImage({
|
|
file,
|
|
onLoad,
|
|
onError,
|
|
}: {
|
|
file: BinaryFile
|
|
onLoad: () => void
|
|
onError: () => void
|
|
}) {
|
|
const { projectId } = useProjectContext()
|
|
return (
|
|
<img
|
|
src={`/project/${projectId}/blob/${file.hash}`}
|
|
onLoad={onLoad}
|
|
onError={onError}
|
|
alt={file.name}
|
|
/>
|
|
)
|
|
}
|