diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index ab57fe7b..b9271a0a 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -74,21 +74,16 @@ export const RightSidePanel = ({ pairForEdit }: RightSidePanelProps) => { } }, [stopGetText, createSettingsObject, socket]); - // Function to handle screenshot settings based on capture type const captureScreenshot = (fullPage: boolean) => { const screenshotSettings: ScreenshotSettings = { fullPage, - // Add other settings as required + type: 'png', + timeout: 30000, + animations: 'allow', + caret: 'hide', + scale: 'device', }; - socket?.emit('action', { action: 'takeScreenshot', settings: screenshotSettings }); - }; - - const handleCaptureFullpage = () => { - captureScreenshot(true); - }; - - const handleCaptureVisiblePart = () => { - captureScreenshot(false); + socket?.emit('action', { action: 'screenshot', settings: screenshotSettings }); }; return ( @@ -103,8 +98,8 @@ export const RightSidePanel = ({ pairForEdit }: RightSidePanelProps) => { {!getText && !getScreenshot && } {getScreenshot && ( - - + + )}