Skip to content
Snippets Groups Projects
Commit c8830caa authored by Kevin Fiedler's avatar Kevin Fiedler
Browse files

Added some dev env improvements

parent b4a42cbe
Branches
Tags
No related merge requests found
......@@ -101,8 +101,6 @@ Refer to the [prisma migration mental model](https://www.prisma.io/docs/orm/pris
4. npm install next@latest react@latest react-dom@latest
5. npm run dev or npm run build
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Content Creation
......
......@@ -22,9 +22,13 @@ export default function ContractsPage() {
useEffect(() => {
if (sessionStorage.getItem('user_id') == null) {
if (process.env.NODE_ENV == 'production') {
// go to demographics if no user id is set
window.location.href = "/study/demographics/"
}
window.location.href = "/study/demographics/"
} else {
generateNewUserID();
}
}
}, []);
......@@ -293,7 +297,7 @@ function UserAccountView({ incompleteAction }: { incompleteAction: () => void })
loadBool("205621d3-dad6-434b-aee0-49d310938d5f-completed", false) &&
loadBool("83104ca6-45f6-4b36-904c-feec9308ac11-completed", false);
if (allLevelsComplete) {
if ((allLevelsComplete) || (process.env.NODE_ENV != 'production')) {
window.location.href = "/study/posttest-tutorial/"
} else {
// alert("You have to complete all levels to complete the study.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment