diff --git a/react/src/components/Main.jsx b/react/src/components/Main.jsx index a1e1456fa1909ff525752f8c6d77a1241fa13f9f..804da4033b6b7d0f26784ebd784437f2fe31a1ad 100644 --- a/react/src/components/Main.jsx +++ b/react/src/components/Main.jsx @@ -13,6 +13,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' const DEBUG = true; // use REMOTE_USER for production const username = 'louistw'; +const params = new URLSearchParams(window.location.search); +const redir_url = params.get('redir') || '/pun/sys/dashboard'; function Main(props) { // Setup states @@ -78,8 +80,8 @@ function Main(props) { clearTimeout(myTimer); })() setTimeout(() => { - if (DEBUG) console.log('Redirecting to /test') - window.location = '/test'; + if (DEBUG) console.log('Redirecting to ' + redir_url) + window.location = redir_url; }, sec * 1000); });