add default filename, use monitor name for filename
This commit is contained in:
1 parent
b0cadf66bf
commit
0e1ffe7cef
2 files changed
+5
-2
No files matched your search
@@ -3,7 +3,7 @@ import ShareIcon from "@mui/icons-material/Share";
|
|||||||
import { Button } from "@mui/material";
|
import { Button } from "@mui/material";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
|
|
||||||
const ShareComponent = ({ elementToCapture, fileName }) => {
|
const ShareComponent = ({ elementToCapture, fileName = "screenshot" }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const captureAndShare = async () => {
|
const captureAndShare = async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -74,7 +74,10 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<ShareComponent elementToCapture={elementToCapture} />
|
<ShareComponent
|
||||||
|
elementToCapture={elementToCapture}
|
||||||
|
fileName={monitor.name}
|
||||||
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<ChatBot sx={{ marginTop: theme.spacing(10) }} />
|
<ChatBot sx={{ marginTop: theme.spacing(10) }} />
|
||||||
</ColContainer>
|
</ColContainer>
|
||||||
|
|||||||
Reference in new issue
Block a user