mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
#58 fixed dialog routers
This commit is contained in:
parent
3e8c2d4b6e
commit
124719c243
15 changed files with 93 additions and 39 deletions
|
@ -12,7 +12,7 @@ const EditorCreateDialog: FC = () => {
|
|||
} = useRouteMatch<{ type: string }>();
|
||||
|
||||
const backUrl = useMemo(() => {
|
||||
return url.replace(/\/create\/(.*)$/, '');
|
||||
return (url && url.replace(/\/create\/(.*)$/, '')) || '/';
|
||||
}, [url]);
|
||||
|
||||
const goBack = useCallback(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue