mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2024-11-16 22:29:24 +08:00
Use hashrouter for github pages compatibility and make login and registration forms consistent
This commit is contained in:
parent
e66bff306f
commit
56ea2c4165
3 changed files with 6 additions and 1 deletions
|
@ -25,7 +25,7 @@ import Register from "./Routes/Register/Register";
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient();
|
||||||
|
|
||||||
const router = createBrowserRouter([
|
const router = createHashRouter([
|
||||||
{
|
{
|
||||||
path: "/",
|
path: "/",
|
||||||
element: (
|
element: (
|
||||||
|
|
|
@ -38,6 +38,7 @@ export default function Login() {
|
||||||
<div style={{ margin: 4 }} />
|
<div style={{ margin: 4 }} />
|
||||||
<input
|
<input
|
||||||
style={styles.input_notetitle}
|
style={styles.input_notetitle}
|
||||||
|
value={user.username}
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setUser({ ...user, username: e.target.value });
|
setUser({ ...user, username: e.target.value });
|
||||||
}}
|
}}
|
||||||
|
@ -50,6 +51,7 @@ export default function Login() {
|
||||||
<input
|
<input
|
||||||
style={styles.input_notetitle}
|
style={styles.input_notetitle}
|
||||||
type="password"
|
type="password"
|
||||||
|
value={user.password}
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setUser({ ...user, password: e.target.value });
|
setUser({ ...user, password: e.target.value });
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -32,6 +32,7 @@ export default function Register() {
|
||||||
<div style={{ margin: 4 }} />
|
<div style={{ margin: 4 }} />
|
||||||
<input
|
<input
|
||||||
style={styles.text_L}
|
style={styles.text_L}
|
||||||
|
value={user.email}
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setUser({ ...user, email: e.target.value });
|
setUser({ ...user, email: e.target.value });
|
||||||
}}
|
}}
|
||||||
|
@ -43,6 +44,7 @@ export default function Register() {
|
||||||
<div style={{ margin: 4 }} />
|
<div style={{ margin: 4 }} />
|
||||||
<input
|
<input
|
||||||
style={styles.text_L}
|
style={styles.text_L}
|
||||||
|
value={user.username}
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setUser({ ...user, username: e.target.value });
|
setUser({ ...user, username: e.target.value });
|
||||||
}}
|
}}
|
||||||
|
@ -55,6 +57,7 @@ export default function Register() {
|
||||||
<input
|
<input
|
||||||
style={styles.text_L}
|
style={styles.text_L}
|
||||||
type="password"
|
type="password"
|
||||||
|
value={user.password}
|
||||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
setUser({ ...user, password: e.target.value });
|
setUser({ ...user, password: e.target.value });
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in a new issue