feat: start pagination mode
This commit is contained in:
@@ -5,6 +5,7 @@ interface ActionContextProps {
|
|||||||
getList: boolean;
|
getList: boolean;
|
||||||
getScreenshot: boolean;
|
getScreenshot: boolean;
|
||||||
paginationMode: boolean;
|
paginationMode: boolean;
|
||||||
|
startPaginationMode: () => void;
|
||||||
startGetText: () => void;
|
startGetText: () => void;
|
||||||
stopGetText: () => void;
|
stopGetText: () => void;
|
||||||
startGetList: () => void;
|
startGetList: () => void;
|
||||||
@@ -21,6 +22,8 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
|
|||||||
const [getScreenshot, setGetScreenshot] = useState<boolean>(false);
|
const [getScreenshot, setGetScreenshot] = useState<boolean>(false);
|
||||||
const [paginationMode, setPaginationMode] = useState<boolean>(false);
|
const [paginationMode, setPaginationMode] = useState<boolean>(false);
|
||||||
|
|
||||||
|
const startPaginationMode = () => setPaginationMode(true);
|
||||||
|
|
||||||
const startGetText = () => setGetText(true);
|
const startGetText = () => setGetText(true);
|
||||||
const stopGetText = () => setGetText(false);
|
const stopGetText = () => setGetText(false);
|
||||||
|
|
||||||
@@ -31,7 +34,7 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
|
|||||||
const stopGetScreenshot = () => setGetScreenshot(false);
|
const stopGetScreenshot = () => setGetScreenshot(false);
|
||||||
|
|
||||||
return (
|
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}
|
{children}
|
||||||
</ActionContext.Provider>
|
</ActionContext.Provider>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user