From e69167bb56f19d8ed4c51fdb4b1391b3dd341dff Mon Sep 17 00:00:00 2001 From: German Urrustarazu Date: Fri, 8 Jul 2022 15:06:49 -0300 Subject: [PATCH] fix modal default --- frontend/packages/client/src/pages/About.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/packages/client/src/pages/About.js b/frontend/packages/client/src/pages/About.js index 0ed00f45a..680b9b228 100644 --- a/frontend/packages/client/src/pages/About.js +++ b/frontend/packages/client/src/pages/About.js @@ -5,9 +5,14 @@ import { Gitbook, Github } from '../components/Svg'; const AboutPage = ({ location }) => { const { state = {} } = location; const history = useHistory(); - const { modal } = state; + const { modal = true } = state; const closeModal = () => { - history.push('/'); + // user landed on about page: no history + if (history.length <= 2) { + history.push('/'); + return; + } + history.goBack(); }; return (