Switch to local backend and polish login page

This commit is contained in:
keannu125 2023-03-29 18:59:35 +08:00
parent 37d67ced7d
commit 9bd19b2baf
2 changed files with 3 additions and 1 deletions

View file

@ -10,7 +10,7 @@ import {
// Note APIs // Note APIs
const instance = axios.create({ const instance = axios.create({
baseURL: "https://keannu126.pythonanywhere.com", baseURL: "http://localhost:8000",
}); });
export function GetNotes() { export function GetNotes() {

View file

@ -32,6 +32,7 @@ export default function Login() {
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setUser({ ...user, username: e.target.value }); setUser({ ...user, username: e.target.value });
}} }}
value={user.username}
/> />
</div> </div>
<div style={styles.flex_row}> <div style={styles.flex_row}>
@ -43,6 +44,7 @@ export default function Login() {
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setUser({ ...user, password: e.target.value }); setUser({ ...user, password: e.target.value });
}} }}
value={user.password}
/> />
</div> </div>
<Button <Button