feat: stop pagination mode
This commit is contained in:
@@ -12,6 +12,7 @@ interface ActionContextProps {
|
|||||||
stopGetList: () => void;
|
stopGetList: () => void;
|
||||||
startGetScreenshot: () => void;
|
startGetScreenshot: () => void;
|
||||||
stopGetScreenshot: () => void;
|
stopGetScreenshot: () => void;
|
||||||
|
stopPaginationMode: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ActionContext = createContext<ActionContextProps | undefined>(undefined);
|
const ActionContext = createContext<ActionContextProps | undefined>(undefined);
|
||||||
@@ -23,6 +24,7 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
|
|||||||
const [paginationMode, setPaginationMode] = useState<boolean>(false);
|
const [paginationMode, setPaginationMode] = useState<boolean>(false);
|
||||||
|
|
||||||
const startPaginationMode = () => setPaginationMode(true);
|
const startPaginationMode = () => setPaginationMode(true);
|
||||||
|
const stopPaginationMode = () => setPaginationMode(false);
|
||||||
|
|
||||||
const startGetText = () => setGetText(true);
|
const startGetText = () => setGetText(true);
|
||||||
const stopGetText = () => setGetText(false);
|
const stopGetText = () => setGetText(false);
|
||||||
@@ -33,8 +35,10 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
|
|||||||
const startGetScreenshot = () => setGetScreenshot(true);
|
const startGetScreenshot = () => setGetScreenshot(true);
|
||||||
const stopGetScreenshot = () => setGetScreenshot(false);
|
const stopGetScreenshot = () => setGetScreenshot(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ActionContext.Provider value={{ getText, getList, getScreenshot, paginationMode, startGetText, stopGetText, startGetList, stopGetList, startGetScreenshot, stopGetScreenshot, startPaginationMode }}>
|
<ActionContext.Provider value={{ getText, getList, getScreenshot, paginationMode, startGetText, stopGetText, startGetList, stopGetList, startGetScreenshot, stopGetScreenshot, startPaginationMode, stopPaginationMode }}>
|
||||||
{children}
|
{children}
|
||||||
</ActionContext.Provider>
|
</ActionContext.Provider>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user