feat: use getText & getScreenshot action context

This commit is contained in:
karishmas6
2024-07-24 20:26:58 +05:30
parent 2521a1a25c
commit ccc9708cf5

View File

@@ -21,6 +21,7 @@ export const RightSidePanel = ({pairForEdit}: RightSidePanelProps) => {
const [isSettingsDisplayed, setIsSettingsDisplayed] = React.useState<boolean>(false);
const { lastAction } = useGlobalInfoStore();
const { handleGetText, handleGetScreenshot } = useActionContext();
const handleChange = (event: React.SyntheticEvent, newValue: string) => {
setContent(newValue);
@@ -81,8 +82,8 @@ export const RightSidePanel = ({pairForEdit}: RightSidePanelProps) => {
: null
}
<Button variant="contained">Capture Text</Button>
<Button variant="contained">Capture Screenshot</Button>
<Button variant="contained" onClick={handleGetText}>Capture Text</Button>
<Button variant="contained" onClick={handleGetScreenshot}>Capture Screenshot</Button>
</Paper>
);
};