🏡 index : ~doyle/chartered.git

author Jordan Doyle <jordan@doyle.la> 2021-09-20 0:22:58.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2021-09-20 0:22:58.0 +01:00:00
commit
0b4ae0bc3c627d9e64228b255d70c0d505907c87 [patch]
tree
2e1ec6d8a19141e9daca5e7a461477cd202e224b
parent
03179cd83e33dc2ef2e3cce1329751aed2ca215d
download
0b4ae0bc3c627d9e64228b255d70c0d505907c87.tar.gz

Redirect back to the page requested upon login



Diff

 chartered-frontend/src/index.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/chartered-frontend/src/index.tsx b/chartered-frontend/src/index.tsx
index 69dd4a4..eeceeda 100644
--- a/chartered-frontend/src/index.tsx
+++ a/chartered-frontend/src/index.tsx
@@ -96,7 +96,10 @@
        } else {
          return (
            <Redirect
              to={{ pathname: "/dashboard", state: { from: props.location } }}
              to={{
                pathname: props.location.state?.from?.pathname ?? "/dashboard",
                state: { from: props.location },
              }}
            />
          );
        }