add linter
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import React, {FormEvent, SyntheticEvent, useState} from "react"
|
||||
import Field from "../../components/Field";
|
||||
import axios from "axios";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import useAuthUser from "../../hooks/AuthUser";
|
||||
import useAxiosTools from "../../hooks/AxiosTools";
|
||||
import React, {FormEvent, useState} from "react"
|
||||
import Field from "../../components/Field"
|
||||
import useAxiosTools from "../../hooks/AxiosTools"
|
||||
|
||||
const ForgotPassword = () => {
|
||||
|
||||
@@ -16,15 +13,15 @@ const ForgotPassword = () => {
|
||||
try {
|
||||
cleanErrors()
|
||||
await axiosGet('/sanctum/csrf-cookie')
|
||||
const res = await axiosPost('/api/forgot', {email})
|
||||
await axiosPost('/api/forgot', {email})
|
||||
setMessage(true)
|
||||
} catch (e) {
|
||||
errorCatch(e)
|
||||
} catch (error) {
|
||||
errorCatch(error)
|
||||
}
|
||||
}
|
||||
|
||||
return <div>
|
||||
<form onSubmit={handleSubmit} className="w-96 mx-auto mt-10 border shadow p-3">
|
||||
<form onSubmit={handleSubmit} className="mx-auto mt-10 w-96 border p-3 shadow">
|
||||
<h1 className="text-center">Mot de passe oublié</h1>
|
||||
|
||||
{message && <p className="bg-green-600">Un email vous a été envoyé pour modifier le mot de passe.</p>}
|
||||
@@ -37,7 +34,7 @@ const ForgotPassword = () => {
|
||||
value={email}
|
||||
onChange={event => setEmail(event.target.value)}
|
||||
autoFocus>Email</Field>
|
||||
<button type="submit" className="mt-5 btn-primary w-full block text-lg">Valider</button>
|
||||
<button type="submit" className="btn-primary mt-5 block w-full text-lg">Valider</button>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import React, {FormEvent, SyntheticEvent, useState} from "react"
|
||||
import axios from "axios";
|
||||
import {Link, useNavigate} from "react-router-dom";
|
||||
import useAxiosTools from "../../hooks/AxiosTools";
|
||||
import Field from "../../components/Field";
|
||||
import useAuthUser from "../../hooks/AuthUser";
|
||||
import Card from "../../components/Card";
|
||||
import React, {FormEvent, useState} from "react"
|
||||
import {Link, useNavigate} from "react-router-dom"
|
||||
import useAxiosTools from "../../hooks/AxiosTools"
|
||||
import Field from "../../components/Field"
|
||||
import useAuthUser from "../../hooks/AuthUser"
|
||||
import Card from "../../components/Card"
|
||||
|
||||
const Login = () => {
|
||||
|
||||
@@ -28,9 +27,9 @@ const Login = () => {
|
||||
}
|
||||
|
||||
return <div>
|
||||
<Card className="w-96 mx-auto mt-10 p-2 overflow-hidden">
|
||||
<Card className="mx-auto mt-10 w-96 overflow-hidden p-2">
|
||||
<form onSubmit={handleSubmit}>
|
||||
<h1 className="text-center bg-blue-500 -mx-2 -mt-1 text-lg font-bold px-2 py-1 mb-2">
|
||||
<h1 className="-mx-2 -mt-1 mb-2 bg-blue-500 px-2 py-1 text-center text-lg font-bold">
|
||||
Connexion
|
||||
</h1>
|
||||
{errorLabel()}
|
||||
@@ -46,7 +45,7 @@ const Login = () => {
|
||||
placeholder="******"
|
||||
value={password}
|
||||
onChange={event => setPassword(event.target.value)}>Mot de passe</Field>
|
||||
<button type="submit" className="mt-5 btn-primary w-full block text-lg">Valider</button>
|
||||
<button type="submit" className="btn-primary mt-5 block w-full text-lg">Valider</button>
|
||||
<Link to="/mot-de-passe-oubliee" className="mt-2 inline-block">Mot de passe oublié ?</Link>
|
||||
</form>
|
||||
</Card>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, {FormEvent, useState} from "react"
|
||||
import useAuthUser from "../../hooks/AuthUser"
|
||||
import Field from "../../components/Field";
|
||||
import useAxiosTools from "../../hooks/AxiosTools";
|
||||
import PageLayout from "../../components/PageLayout";
|
||||
import Card from "../../components/Card";
|
||||
import Field from "../../components/Field"
|
||||
import useAxiosTools from "../../hooks/AxiosTools"
|
||||
import PageLayout from "../../components/PageLayout"
|
||||
import Card from "../../components/Card"
|
||||
|
||||
const Profile = () => {
|
||||
|
||||
@@ -65,7 +65,7 @@ const Profile = () => {
|
||||
Longitude
|
||||
</Field>
|
||||
<div className="self-end">
|
||||
<button type="submit" className="btn-primary w-24 h-10">Valider</button>
|
||||
<button type="submit" className="btn-primary h-10 w-24">Valider</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, {ChangeEvent, FormEvent, SyntheticEvent, useState} from "react"
|
||||
import Field from "../../components/Field";
|
||||
import axios from "axios";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import Card from "../../components/Card";
|
||||
import useAuthUser from "../../hooks/AuthUser";
|
||||
import React, {FormEvent, useState} from "react"
|
||||
import Field from "../../components/Field"
|
||||
import axios from "axios"
|
||||
import {useNavigate} from "react-router-dom"
|
||||
import Card from "../../components/Card"
|
||||
import useAuthUser from "../../hooks/AuthUser"
|
||||
|
||||
const Register = () => {
|
||||
|
||||
@@ -26,10 +26,10 @@ const Register = () => {
|
||||
}
|
||||
|
||||
return <div>
|
||||
<Card className="w-96 mx-auto mt-10 p-2 overflow-hidden">
|
||||
<Card className="mx-auto mt-10 w-96 overflow-hidden p-2">
|
||||
<form onSubmit={handleSubmit}>
|
||||
<h1 className="text-center bg-blue-500 -mx-2 -mt-1 text-lg font-bold px-2 py-1 mb-2">
|
||||
S'inscrire
|
||||
<h1 className="-mx-2 -mt-1 mb-2 bg-blue-500 px-2 py-1 text-center text-lg font-bold">
|
||||
S'inscrire
|
||||
</h1>
|
||||
|
||||
<Field placeholder="Nom"
|
||||
@@ -49,7 +49,7 @@ const Register = () => {
|
||||
value={password}
|
||||
onChange={event => setPassword(event.target.value)}
|
||||
autoFocus>Mot de passe</Field>
|
||||
<button type="submit" className="mt-5 btn-primary w-full block text-lg">Valider</button>
|
||||
<button type="submit" className="btn-primary mt-5 block w-full text-lg">Valider</button>
|
||||
</form>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import Field from "../../components/Field";
|
||||
import React, {FormEvent, useState} from "react";
|
||||
import {useNavigate, useParams} from "react-router-dom";
|
||||
import useAuthUser from "../../hooks/AuthUser";
|
||||
import axios from "axios";
|
||||
import useAxiosTools from "../../hooks/AxiosTools";
|
||||
import Field from "../../components/Field"
|
||||
import React, {FormEvent, useState} from "react"
|
||||
import {useNavigate, useParams} from "react-router-dom"
|
||||
import useAuthUser from "../../hooks/AuthUser"
|
||||
import useAxiosTools from "../../hooks/AxiosTools"
|
||||
|
||||
const Reset = () => {
|
||||
|
||||
let {token} = useParams()
|
||||
const {token} = useParams()
|
||||
const navigate = useNavigate()
|
||||
const {setAuthUser} = useAuthUser()
|
||||
const [email, setEmail] = useState('')
|
||||
@@ -29,7 +28,7 @@ const Reset = () => {
|
||||
}
|
||||
|
||||
return <div>
|
||||
<form onSubmit={handleSubmit} className="w-96 mx-auto mt-10 border shadow p-3">
|
||||
<form onSubmit={handleSubmit} className="mx-auto mt-10 w-96 border p-3 shadow">
|
||||
<h1 className="text-center">Modifier voter mot de passe</h1>
|
||||
|
||||
{errorLabel()}
|
||||
@@ -50,7 +49,7 @@ const Reset = () => {
|
||||
placeholder="******"
|
||||
value={samePassword}
|
||||
onChange={event => setSamePassword(event.target.value)}>Confirmation du mot de passe</Field>
|
||||
<button type="submit" className="mt-5 btn-primary w-full block text-lg">Valider</button>
|
||||
<button type="submit" className="btn-primary mt-5 block w-full text-lg">Valider</button>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user