add default filename, use monitor name for filename

This commit is contained in:
Alex Holliday
2025-02-20 15:20:17 -08:00
parent b0cadf66bf
commit 0e1ffe7cef
2 changed files with 5 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ import ShareIcon from "@mui/icons-material/Share";
import { Button } from "@mui/material";
import { useTheme } from "@emotion/react";
const ShareComponent = ({ elementToCapture, fileName }) => {
const ShareComponent = ({ elementToCapture, fileName = "screenshot" }) => {
const theme = useTheme();
const captureAndShare = async () => {
try {

View File

@@ -74,7 +74,10 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => {
</Typography>
</Stack>
</Stack>
<ShareComponent elementToCapture={elementToCapture} />
<ShareComponent
elementToCapture={elementToCapture}
fileName={monitor.name}
/>
</Stack>
<ChatBot sx={{ marginTop: theme.spacing(10) }} />
</ColContainer>