22 lines
490 B
TypeScript
22 lines
490 B
TypeScript
![]() |
import { Box } from "@mui/material";
|
||
|
import { useLocation } from "react-router-dom";
|
||
|
|
||
|
export default function ChatImageNewWindow() {
|
||
|
const location = useLocation();
|
||
|
console.log(location);
|
||
|
const srcImage = location.pathname.split("image/")[1];
|
||
|
return (
|
||
|
<>
|
||
|
<Box
|
||
|
component="img"
|
||
|
align="center"
|
||
|
sx={{
|
||
|
height: "100%",
|
||
|
width: "100%",
|
||
|
}}
|
||
|
src={`https://storage.yandexcloud.net/pair/${srcImage}`}
|
||
|
/>
|
||
|
</>
|
||
|
);
|
||
|
}
|