feat: start pagination mode

This commit is contained in:
karishmas6
2024-09-05 22:42:34 +05:30
parent 87075abcd0
commit 8ea44ebab0

View File

@@ -5,6 +5,7 @@ interface ActionContextProps {
getList: boolean;
getScreenshot: boolean;
paginationMode: boolean;
startPaginationMode: () => void;
startGetText: () => void;
stopGetText: () => void;
startGetList: () => void;
@@ -21,6 +22,8 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
const [getScreenshot, setGetScreenshot] = useState<boolean>(false);
const [paginationMode, setPaginationMode] = useState<boolean>(false);
const startPaginationMode = () => setPaginationMode(true);
const startGetText = () => setGetText(true);
const stopGetText = () => setGetText(false);
@@ -31,7 +34,7 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
const stopGetScreenshot = () => setGetScreenshot(false);
return (
<ActionContext.Provider value={{ getText, getList, getScreenshot, paginationMode, startGetText, stopGetText, startGetList, stopGetList, startGetScreenshot, stopGetScreenshot }}>
<ActionContext.Provider value={{ getText, getList, getScreenshot, paginationMode, startGetText, stopGetText, startGetList, stopGetList, startGetScreenshot, stopGetScreenshot, startPaginationMode }}>
{children}
</ActionContext.Provider>
);