feat: -rm pagination

This commit is contained in:
karishmas6
2024-09-04 04:26:53 +05:30
parent 35e13baec0
commit eaa63e2139

View File

@@ -54,8 +54,6 @@ export const BrowserWindow = () => {
const [showAttributeModal, setShowAttributeModal] = useState(false);
const [attributeOptions, setAttributeOptions] = useState<AttributeOption[]>([]);
const [selectedElement, setSelectedElement] = useState<{ selector: string, info: ElementInfo | null } | null>(null);
const [isSelectingPagination, setIsSelectingPagination] = useState(false);
const [listSelector, setListSelector] = useState<string | null>(null);
const [fields, setFields] = useState<Record<string, TextStep>>({});
@@ -150,11 +148,6 @@ export const BrowserWindow = () => {
const options = getAttributeOptions(highlighterData.elementInfo?.tagName || '', highlighterData.elementInfo);
if (isSelectingPagination) {
socket?.emit('paginationSelected', { selector: highlighterData.selector });
setIsSelectingPagination(false);
}
if (getText === true) {
if (options.length === 1) {
// Directly use the available attribute if only one option is present
@@ -273,18 +266,6 @@ export const BrowserWindow = () => {
setShowAttributeModal(false);
};
useEffect(() => {
const handleStartPaginationSelection = () => {
setIsSelectingPagination(true);
};
socket?.on('startPaginationSelection', handleStartPaginationSelection);
return () => {
socket?.off('startPaginationSelection', handleStartPaginationSelection);
};
}, [socket]);
return (
<div onClick={handleClick}>
{