diff --git a/client/src/components/login.component.jsx b/client/src/components/login.component.jsx index 3a2d7e2d..3eb4a2d6 100644 --- a/client/src/components/login.component.jsx +++ b/client/src/components/login.component.jsx @@ -1,11 +1,10 @@ // eslint-disable-next-line const preact = require('preact'); +const { useState } = require('preact/hooks'); function renderLogin({ submitLogin, submitRegister }) { - const details = { - name: '', - password: '', - }; + const [name, setName] = useState(''); + const [password, setPassword] = useState(''); return (
@@ -13,22 +12,22 @@ function renderLogin({ submitLogin, submitRegister }) { className="login-input" type="email" placeholder="username" - onInput={e => details.name = e.target.value} + onInput={e => setName(e.target.value)} /> details.password = e.target.value} + onInput={e => setPassword(e.target.value)} />
diff --git a/ops/mnml.gg.nginx.conf b/ops/mnml.gg.nginx.conf index 8514a380..55a25a4a 100644 --- a/ops/mnml.gg.nginx.conf +++ b/ops/mnml.gg.nginx.conf @@ -8,7 +8,7 @@ map $http_upgrade $connection_upgrade { } server { - root /home/git/cryps/client/dist/; + root /home/git/mnml/client/dist/; index index.html; server_name mnml.gg; # managed by Certbot @@ -17,6 +17,10 @@ server { return 301 https://mnml.gg$request_uri; } # managed by Certbot + if ($host = cryps.gg) { + return 301 https://mnml.gg$request_uri; + } # managed by Certbot + location / { try_files $uri $uri/ =404; }