diff --git a/README.md b/README.md
index ef38f214..fad570b6 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Copy .env.example to .env and set variables. You can use https://www.grc.com/pas
## Local build/run
cp .env.example .env # Fill in the blanks
- cd web && npm install && npm start
+ cd web && npm install && REACT_APP_API_URL=http://127.0.0.1:42069 npm start
# In another terminal
go mod tidy
CGO_ENABLED=0 go run cmd/go-scrobble/*.go
@@ -29,6 +29,6 @@ Access dev frontend @ http://127.0.0.1:3000 + API @ http://127.0.0.1:42069/api/v
## Prod deployment
We need to build NPM package, and then ship web/build with the binary.
cp .env.example .env # Fill in the blanks
- cd web npm install --production && npm run build
+ cd web npm install --production && REACT_APP_API_URL=https://goscrobble.com npm run build
go build -o goscrobble cmd/go-scrobble/*.go
./goscrobble
\ No newline at end of file
diff --git a/internal/goscrobble/user.go b/internal/goscrobble/user.go
index 8e7feac6..a604f926 100644
--- a/internal/goscrobble/user.go
+++ b/internal/goscrobble/user.go
@@ -96,11 +96,11 @@ func loginUser(logReq *LoginRequest, ip net.IP) ([]byte, error) {
var user User
if logReq.Username == "" {
- return resp, errors.New("username must be set")
+ return resp, errors.New("A username is required")
}
if logReq.Password == "" {
- return resp, errors.New("password must be set")
+ return resp, errors.New("A password is required")
}
if strings.Contains(logReq.Username, "@") {
diff --git a/web/src/App.js b/web/src/App.js
index e5739e8d..26d9422f 100644
--- a/web/src/App.js
+++ b/web/src/App.js
@@ -3,7 +3,7 @@ import Home from './Components/Pages/Home';
import About from './Components/Pages/About';
import Login from './Components/Pages/Login';
import Register from './Components/Pages/Register';
-import Navigation from './Components/Pages/Navigation';
+import Navigation from './Components/Navigation';
import { Route, Switch, HashRouter } from 'react-router-dom';
import { connect } from "react-redux";
diff --git a/web/src/Components/Navigation.css b/web/src/Components/Navigation.css
index 8480283c..617b6ece 100644
--- a/web/src/Components/Navigation.css
+++ b/web/src/Components/Navigation.css
@@ -6,4 +6,10 @@
.navLink:hover {
color: #666666;
text-decoration: none;
+}
+
+.navLinkLogin {
+ margin-left: 15px;
+ padding-left: 15px;
+ border-left: 1px solid #282c34;
}
\ No newline at end of file
diff --git a/web/src/Components/Navigation.js b/web/src/Components/Navigation.js
index c4ab9903..7325143c 100644
--- a/web/src/Components/Navigation.js
+++ b/web/src/Components/Navigation.js
@@ -28,11 +28,17 @@ class Navigation extends Component {
render() {
const activeStyle = { color: '#FFFFFF' };
- const renderAuthButton = () => {
+ const renderAuthButtons = () => {
if (this.state.isLoggedIn) {
- return Logout;
+ return