Clean code

This commit is contained in:
Pierre HUBERT 2023-06-14 15:30:16 +02:00
parent 71db3339d8
commit 6f58e767a2
3 changed files with 5 additions and 18 deletions

View File

@ -1,6 +1,3 @@
import React, { useRef } from "react";
import { AsyncWidget } from "../widgets/AsyncWidget";
import { ReplacePasswordResponse, User, UserApi } from "../api/UserApi";
import {
Alert,
Box,
@ -9,15 +6,16 @@ import {
CardActions,
CardContent,
Checkbox,
CircularProgress,
FormControlLabel,
TextField,
Typography,
} from "@mui/material";
import { TimeWidget, formatDate } from "../widgets/TimeWidget";
import React, { useRef } from "react";
import { ServerApi } from "../api/ServerApi";
import { ReplacePasswordResponse, User, UserApi } from "../api/UserApi";
import { AsyncWidget } from "../widgets/AsyncWidget";
import { PasswordInput } from "../widgets/PasswordInput";
import { normalize } from "path/win32";
import { formatDate } from "../widgets/TimeWidget";
export function ProfileRoute(): React.ReactElement {
const [user, setUser] = React.useState<null | User>(null);

View File

@ -3,15 +3,13 @@ import {
Box,
Button,
CircularProgress,
Grid,
TextField,
Typography,
} from "@mui/material";
import React from "react";
import { ServerApi } from "../../api/ServerApi";
import { Link } from "react-router-dom";
import { APIClient } from "../../api/ApiClient";
import { AuthApi } from "../../api/AuthApi";
import { ServerApi } from "../../api/ServerApi";
export function PasswordForgottenRoute(): React.ReactElement {
const [loading, setLoading] = React.useState(false);

View File

@ -35,15 +35,6 @@ function Copyright(props: any) {
}
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 (
<Grid container component="main" sx={{ height: "100vh" }}>
<CssBaseline />