feat: Use new /routing URL for routing forms (#19235)
* feat: Use new /routing URL for routing forms * Fixes * Fix bug * precent crash --------- Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
1 parent
6364e85293
commit
f6f964d495
14 files changed
+376
-129
No files matched your search
@@ -152,9 +152,18 @@ export function ShellMain(props: LayoutProps) {
|
||||
variant="icon"
|
||||
size="sm"
|
||||
color="minimal"
|
||||
onClick={() =>
|
||||
typeof props.backPath === "string" ? router.push(props.backPath as string) : router.back()
|
||||
}
|
||||
onClick={() => {
|
||||
if (typeof props.backPath === "string") {
|
||||
// Prevents weird crash when navigating from /routing to /routing/forms
|
||||
if (props.backPath.startsWith("/routing")) {
|
||||
window.location.href = props.backPath;
|
||||
} else {
|
||||
router.push(props.backPath as string);
|
||||
}
|
||||
} else {
|
||||
router.back();
|
||||
}
|
||||
}}
|
||||
StartIcon="arrow-left"
|
||||
aria-label="Go Back"
|
||||
className="rounded-md ltr:mr-2 rtl:ml-2"
|
||||
|
||||
Reference in new issue
Block a user