default to table-of-contents after the user has seen the intro page
This commit is contained in:
parent
a4a496f0fe
commit
e2db1928bb
|
@ -44,6 +44,13 @@ function App(props: RouteComponentProps) {
|
|||
}
|
||||
useEffect(() => {
|
||||
logAnalytics();
|
||||
if (props.location.pathname === "/") {
|
||||
if (localStorage.getItem("visitedOnce")) {
|
||||
props.history.replace("/table-of-contents");
|
||||
} else {
|
||||
localStorage.setItem("visitedOnce", "true");
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Reference in New Issue