Clean code
This commit is contained in:
parent
71db3339d8
commit
6f58e767a2
@ -1,6 +1,3 @@
|
|||||||
import React, { useRef } from "react";
|
|
||||||
import { AsyncWidget } from "../widgets/AsyncWidget";
|
|
||||||
import { ReplacePasswordResponse, User, UserApi } from "../api/UserApi";
|
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
Box,
|
Box,
|
||||||
@ -9,15 +6,16 @@ import {
|
|||||||
CardActions,
|
CardActions,
|
||||||
CardContent,
|
CardContent,
|
||||||
Checkbox,
|
Checkbox,
|
||||||
CircularProgress,
|
|
||||||
FormControlLabel,
|
FormControlLabel,
|
||||||
TextField,
|
TextField,
|
||||||
Typography,
|
Typography,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { TimeWidget, formatDate } from "../widgets/TimeWidget";
|
import React, { useRef } from "react";
|
||||||
import { ServerApi } from "../api/ServerApi";
|
import { ServerApi } from "../api/ServerApi";
|
||||||
|
import { ReplacePasswordResponse, User, UserApi } from "../api/UserApi";
|
||||||
|
import { AsyncWidget } from "../widgets/AsyncWidget";
|
||||||
import { PasswordInput } from "../widgets/PasswordInput";
|
import { PasswordInput } from "../widgets/PasswordInput";
|
||||||
import { normalize } from "path/win32";
|
import { formatDate } from "../widgets/TimeWidget";
|
||||||
|
|
||||||
export function ProfileRoute(): React.ReactElement {
|
export function ProfileRoute(): React.ReactElement {
|
||||||
const [user, setUser] = React.useState<null | User>(null);
|
const [user, setUser] = React.useState<null | User>(null);
|
||||||
|
@ -3,15 +3,13 @@ import {
|
|||||||
Box,
|
Box,
|
||||||
Button,
|
Button,
|
||||||
CircularProgress,
|
CircularProgress,
|
||||||
Grid,
|
|
||||||
TextField,
|
TextField,
|
||||||
Typography,
|
Typography,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { ServerApi } from "../../api/ServerApi";
|
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { APIClient } from "../../api/ApiClient";
|
|
||||||
import { AuthApi } from "../../api/AuthApi";
|
import { AuthApi } from "../../api/AuthApi";
|
||||||
|
import { ServerApi } from "../../api/ServerApi";
|
||||||
|
|
||||||
export function PasswordForgottenRoute(): React.ReactElement {
|
export function PasswordForgottenRoute(): React.ReactElement {
|
||||||
const [loading, setLoading] = React.useState(false);
|
const [loading, setLoading] = React.useState(false);
|
||||||
|
@ -35,15 +35,6 @@ function Copyright(props: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function BaseLoginPage() {
|
export function BaseLoginPage() {
|
||||||
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
|
|
||||||
event.preventDefault();
|
|
||||||
const data = new FormData(event.currentTarget);
|
|
||||||
console.log({
|
|
||||||
email: data.get("email"),
|
|
||||||
password: data.get("password"),
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container component="main" sx={{ height: "100vh" }}>
|
<Grid container component="main" sx={{ height: "100vh" }}>
|
||||||
<CssBaseline />
|
<CssBaseline />
|
||||||
|
Loading…
Reference in New Issue
Block a user