fix(router): Expose the react router from the worklist too. (#5062)
This commit is contained in:
1 parent
c2cc0832f3
commit
14f5f0c074
12 files changed
+101
-95
No files matched your search
@@ -1,9 +1,16 @@
|
||||
import { NavigateFunction } from 'react-router';
|
||||
|
||||
type History = {
|
||||
interface History {
|
||||
navigate: NavigateFunction;
|
||||
};
|
||||
}
|
||||
|
||||
let navigate;
|
||||
|
||||
export const history: History = {
|
||||
navigate: null,
|
||||
set navigate(nav: NavigateFunction) {
|
||||
navigate ??= nav;
|
||||
},
|
||||
get navigate() {
|
||||
return navigate;
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user