feat(wip): addBrowserSteps for highlighter

This commit is contained in:
karishmas6
2024-07-26 22:53:02 +05:30
parent be1500b769
commit 1f15857fef

View File

@@ -5,6 +5,7 @@ import { useBrowserDimensionsStore } from "../../context/browserDimensions";
import { Highlighter } from "../atoms/Highlighter";
import { GenericModal } from '../atoms/GenericModal';
import { useActionContext } from '../../context/browserActions';
import { useBrowserSteps } from '../../context/browserSteps';
import { ConfirmationBox } from "../atoms/ConfirmationBox";
export const BrowserWindow = () => {
@@ -16,6 +17,7 @@ export const BrowserWindow = () => {
const { socket } = useSocketStore();
const { width, height } = useBrowserDimensionsStore();
const { getText, getScreenshot } = useActionContext();
const { addBrowserStep } = useBrowserSteps();
const onMouseMove = (e: MouseEvent) => {
if (canvasRef && canvasRef.current && highlighterData) {
@@ -78,7 +80,7 @@ export const BrowserWindow = () => {
clickY >= highlightRect.top &&
clickY <= highlightRect.bottom
) {
setShowConfirmation(true);
addBrowserStep('Label 1', highlighterData.selector);
}
}
};