mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-23 01:04:18 +01:00
Gifting
This commit is contained in:
committed by
Tony Giorgio
parent
ccb7f3737e
commit
932c0a1f2b
@@ -14,7 +14,10 @@ export function BackPop() {
|
||||
|
||||
const state = location.state as StateWithPrevious;
|
||||
|
||||
const backPath = () => (state?.previous ? state?.previous : "/");
|
||||
// If there's no previous state want to just go back one level, basically ../
|
||||
const newBackPath = location.pathname.split("/").slice(0, -1).join("/");
|
||||
|
||||
const backPath = () => (state?.previous ? state?.previous : newBackPath);
|
||||
|
||||
return (
|
||||
<BackButton
|
||||
|
||||
Reference in New Issue
Block a user