fix(ts): use PaginationType instead of string

This commit is contained in:
karishmas6
2024-09-06 23:59:41 +05:30
parent c41df0cd96
commit a91220f0d4

View File

@@ -6,7 +6,7 @@ import DocumentScannerIcon from '@mui/icons-material/DocumentScanner';
import { SimpleBox } from "../atoms/Box";
import Typography from "@mui/material/Typography";
import { useGlobalInfoStore } from "../../context/globalInfo";
import { useActionContext } from '../../context/browserActions';
import { PaginationType, useActionContext } from '../../context/browserActions';
import { useBrowserSteps } from '../../context/browserSteps';
import { useSocketStore } from '../../context/socket';
import { ScreenshotSettings } from '../../shared/types';
@@ -25,7 +25,7 @@ export const RightSidePanel = () => {
const [showPaginationOptions, setShowPaginationOptions] = useState(false);
const { lastAction, notify } = useGlobalInfoStore();
const { getText, startGetText, stopGetText, getScreenshot, startGetScreenshot, stopGetScreenshot, paginationMode, getList, startGetList, stopGetList, startPaginationMode, stopPaginationMode, paginationType, updatePaginationType } = useActionContext();
const { getText, startGetText, stopGetText, getScreenshot, startGetScreenshot, stopGetScreenshot, paginationMode, getList, startGetList, stopGetList, startPaginationMode, stopPaginationMode, paginationType, updatePaginationType, PaginationType } = useActionContext();
const { browserSteps, updateBrowserTextStepLabel, deleteBrowserStep, addScreenshotStep } = useBrowserSteps();
const { socket } = useSocketStore();
@@ -161,7 +161,7 @@ export const RightSidePanel = () => {
updatePaginationType('');
}, [paginationType, stopCaptureAndEmitGetListSettings, notify]);
const handlePaginationSettingSelect = (option: string) => {
const handlePaginationSettingSelect = (option: PaginationType) => {
updatePaginationType(option);
if (['clickNext', 'clickLoadMore'].includes(option)) {
}