Skip to content

Commit 39d8438

Browse files
committed
Make A Fix For Turning On and Off Modals
1 parent 54f6817 commit 39d8438

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
NODE_PATH=src
22
REACT_APP_URL="http://localhost:3000"
3+
REACT_APP_ENV="development"
34
REACT_APP_API_URL="http://localhost:8008/"
45
# REACT_APP_API_URL="https://open.senrigan.io/"

.env.production

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
NODE_PATH=src
22
REACT_APP_URL="https://writeup.ai"
3-
REACT_APP_API_URL="https://open.senrigan.io/"
3+
REACT_APP_API_URL="https://open.senrigan.io/"
4+
REACT_APP_ENV="production"

src/components/MainComponent/Main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export class _MainComponent extends React.Component {
5959
// this is getting into spaghetti, but needed this for async
6060
this.undoAdd = this.undoAdd.bind(this);
6161

62+
const showTutorial =
63+
process.env.REACT_APP_ENV === "development" ? false : true;
64+
6265
this.state = {
6366
editorValue: initialValue,
6467
currentDetailIndex: null,
@@ -88,7 +91,7 @@ export class _MainComponent extends React.Component {
8891
loginOrRegisterModal: false,
8992
settingsModalOpen: false,
9093
publishModalOpen: false,
91-
tutorialModalOpen: false,
94+
tutorialModalOpen: showTutorial,
9295

9396
// during saving, only let one request happen
9497
publishDisabled: false,

src/components/TopbarComponent/Topbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component, Fragment } from "react";
1+
import React, { Component } from "react";
22
import Grid from "@material-ui/core/Grid/Grid";
33
import Typography from "@material-ui/core/Typography/Typography";
44
import { Link, withRouter } from "react-router-dom";

0 commit comments

Comments
 (0)