fix: Fix Map page

This commit is contained in:
2025-06-12 22:50:43 +03:00
parent 27cb644242
commit 300ff262ce
41 changed files with 2216 additions and 1055 deletions

View File

@ -13,16 +13,30 @@ export function MediaViewer({
media,
className,
fullWidth,
}: Readonly<{ media?: MediaData; className?: string; fullWidth?: boolean }>) {
fullHeight,
}: Readonly<{
media?: MediaData;
className?: string;
fullWidth?: boolean;
fullHeight?: boolean;
}>) {
const token = localStorage.getItem("token");
return (
<Box className={className} width={fullWidth ? "100%" : "auto"}>
<Box
className={className}
width={fullWidth ? "100%" : "auto"}
height={fullHeight ? "100%" : "auto"}
>
{media?.media_type === 1 && (
<img
src={`${import.meta.env.VITE_KRBL_MEDIA}${
media?.id
}/download?token=${token}`}
alt={media?.filename}
style={{
height: fullHeight ? "100%" : "auto",
width: fullWidth ? "100%" : "auto",
}}
/>
)}
@ -48,6 +62,10 @@ export function MediaViewer({
media?.id
}/download?token=${token}`}
alt={media?.filename}
style={{
height: fullHeight ? "100%" : "auto",
width: fullWidth ? "100%" : "auto",
}}
/>
)}
{media?.media_type === 4 && (
@ -78,6 +96,7 @@ export function MediaViewer({
media?.id
}/download?token=${token}`}
height="100%"
width="1000px"
/>
)}
</Box>