mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-01 23:56:41 +07:00
removed redux completely
This commit is contained in:
parent
26e6d8d41b
commit
a4bb07e9cf
323 changed files with 2464 additions and 3348 deletions
|
@ -1,24 +0,0 @@
|
|||
import { useEffect } from "react";
|
||||
import { history } from "~/redux/store";
|
||||
|
||||
/**
|
||||
* useBlockBackButton - blocks back navigation and calls {callback}
|
||||
* @param callback
|
||||
*/
|
||||
export const useBlockBackButton = (callback?: () => void) => {
|
||||
useEffect(
|
||||
() =>
|
||||
history.listen((newLocation, action) => {
|
||||
if (action !== 'POP') {
|
||||
return;
|
||||
}
|
||||
|
||||
history.goForward();
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}),
|
||||
[callback]
|
||||
);
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
import { useCallback } from 'react';
|
||||
import { IFile } from '~/redux/types';
|
||||
import { IFile } from '~/types';
|
||||
import { useShowModal } from '~/hooks/modal/useShowModal';
|
||||
import { Dialog } from '~/constants/modal';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue