20 lines
450 B
TypeScript
20 lines
450 B
TypeScript
|
import { Box } from "@mui/material";
|
||
|
import { useLocation } from "react-router-dom";
|
||
|
|
||
|
export default function ChatImageNewWindow() {
|
||
|
const location = useLocation();
|
||
|
const srcImage = location.pathname.split("image/")[1];
|
||
|
return (
|
||
|
<>
|
||
|
<Box
|
||
|
component="img"
|
||
|
sx={{
|
||
|
maxHeight: "100vh",
|
||
|
maxWidth: "100vw",
|
||
|
}}
|
||
|
src={`https://storage.yandexcloud.net/pair/${srcImage}`}
|
||
|
/>
|
||
|
</>
|
||
|
);
|
||
|
}
|