diff --git a/.docker/docker-compose.override.yml b/.docker/docker-compose.override.yml index eb963e6e..b583f59b 100644 --- a/.docker/docker-compose.override.yml +++ b/.docker/docker-compose.override.yml @@ -18,4 +18,4 @@ services: wallet-spa: build: args: - ENV: development + ENV: docker diff --git a/wallet-spa/.env.development b/wallet-spa/.env.development new file mode 100644 index 00000000..e6b57756 --- /dev/null +++ b/wallet-spa/.env.development @@ -0,0 +1,6 @@ +REACT_APP_AUTHORITY=https://wallet.local:8081/identity-server +REACT_APP_REDIRECT_URI=https://wallet.local:8081/callback +REACT_APP_POST_LOGOUT_REDIRECT_URI=https://wallet.local:8081 +REACT_APP_ACCOUNTS_API=https://wallet.local:8081/accounts-api +SSL_CRT_FILE=../.docker/https/localhost.crt +SSL_KEY_FILE=../.docker/https/localhost.key \ No newline at end of file diff --git a/wallet-spa/development.env b/wallet-spa/.env.docker similarity index 67% rename from wallet-spa/development.env rename to wallet-spa/.env.docker index 92f8cd7b..5cc37646 100644 --- a/wallet-spa/development.env +++ b/wallet-spa/.env.docker @@ -1,4 +1,6 @@ REACT_APP_AUTHORITY=https://wallet.local:8081/identity-server REACT_APP_REDIRECT_URI=https://wallet.local:8081/callback REACT_APP_POST_LOGOUT_REDIRECT_URI=https://wallet.local:8081 -REACT_APP_ACCOUNTS_API=https://wallet.local:8081/accounts-api \ No newline at end of file +REACT_APP_ACCOUNTS_API=https://wallet.local:8081/accounts-api +HTTPS=false +PORT=3000 \ No newline at end of file diff --git a/wallet-spa/.env b/wallet-spa/.env.localhost similarity index 70% rename from wallet-spa/.env rename to wallet-spa/.env.localhost index ac0df068..a1667b82 100644 --- a/wallet-spa/.env +++ b/wallet-spa/.env.localhost @@ -4,5 +4,3 @@ REACT_APP_POST_LOGOUT_REDIRECT_URI=https://localhost:5002 REACT_APP_ACCOUNTS_API=https://localhost:5001 HTTPS=true PORT=5002 -SSL_CRT_FILE=../.docker/https/localhost.crt -SSL_KEY_FILE=../.docker/https/localhost.key \ No newline at end of file diff --git a/wallet-spa/package.json b/wallet-spa/package.json index 42a992ff..2e9d509e 100644 --- a/wallet-spa/package.json +++ b/wallet-spa/package.json @@ -26,6 +26,7 @@ "start": "NODE_ENV=localhost react-scripts start", "start-localhost": "NODE_ENV=localhost react-scripts start", "start-development": "NODE_ENV=development react-scripts start", + "start-docker": "NODE_ENV=docker react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/wallet-spa/src/pages/Accounts.jsx b/wallet-spa/src/pages/Accounts.jsx index 9d2cc85c..bf1ff4d4 100644 --- a/wallet-spa/src/pages/Accounts.jsx +++ b/wallet-spa/src/pages/Accounts.jsx @@ -11,7 +11,6 @@ import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Divider from "@material-ui/core/Divider"; - class Accounts extends React.Component { static displayName = Accounts.name; diff --git a/wallet-spa/src/pages/OpenAccount.jsx b/wallet-spa/src/pages/OpenAccount.jsx index d51983b1..94d6a01a 100644 --- a/wallet-spa/src/pages/OpenAccount.jsx +++ b/wallet-spa/src/pages/OpenAccount.jsx @@ -1,7 +1,5 @@ import React, { } from "react"; import accountsService from "../store/accountsService"; -import { withStyles } from "@material-ui/core/styles"; -import PropTypes from 'prop-types'; import { withRouter } from "react-router"; import PageBase from "../components/PageBase"; import { Link } from "react-router-dom"; @@ -9,10 +7,7 @@ import Button from "@material-ui/core/Button"; import MenuItem from "@material-ui/core/MenuItem"; import TextField from "@material-ui/core/TextField"; import Select from "@material-ui/core/Select"; -import FormControlLabel from "@material-ui/core/FormControlLabel"; -import Switch from "@material-ui/core/Switch"; import { grey } from "@material-ui/core/colors"; -import Divider from "@material-ui/core/Divider"; import FormControl from "@material-ui/core/FormControl"; import InputLabel from "@material-ui/core/InputLabel"; @@ -38,7 +33,7 @@ class OpenAccount extends React.Component { handleInputChange = event => { const { name, value } = event.target; this.setState( - prevState => { + () => { return { [name]: value };