-
Notifications
You must be signed in to change notification settings - Fork 291
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: notify增加点击输入框跳转的功能,并增加api调用页面跳转的方式
- Loading branch information
1 parent
3b4224d
commit 1290c1e
Showing
4 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import type { PropsWithChildren } from 'react'; | ||
import { useNavigate, NavigateFunction } from 'react-router'; | ||
|
||
export let navigate: NavigateFunction = () => { | ||
throw new Error('route navigate not init'); | ||
}; | ||
|
||
export const AppRouterApi: React.FC<PropsWithChildren> = React.memo(() => { | ||
const _navigate = useNavigate(); | ||
navigate = _navigate; | ||
|
||
return null; | ||
}); | ||
AppRouterApi.displayName = 'AppRouterApi'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters