remove debug logs and format
continuous-integration/drone/push Build is passing Details

pull/107/head
maxime 1 year ago
parent 0a451334d2
commit 3beff7e972

@ -1,7 +1,8 @@
# THIS FILE IS DEPRECATED # THIS FILE IS DEPRECATED
See [#107](https://codefirst.iut.uca.fr/git/IQBall/Application-Web/pulls/107) for more details See [#107](https://codefirst.iut.uca.fr/git/IQBall/Application-Web/pulls/107) for more details
----- ---
This documentation file explains how to start a development server on your This documentation file explains how to start a development server on your
machine, and how it works under the hood. machine, and how it works under the hood.

@ -115,7 +115,6 @@ export default function EditorPage({ guestMode }: EditorPageProps) {
} }
async function initialize() { async function initialize() {
console.log("initializing")
const infoResponse = fetchAPIGet(`tactics/${id}`) const infoResponse = fetchAPIGet(`tactics/${id}`)
const contentResponse = fetchAPIGet(`tactics/${id}/1`) const contentResponse = fetchAPIGet(`tactics/${id}/1`)
const { name, courtType } = await (await infoResponse).json() const { name, courtType } = await (await infoResponse).json()
@ -675,7 +674,7 @@ function CourtPlayerArrowAction({
})) }))
}} }}
onHeadPicked={(headPos) => { onHeadPicked={(headPos) => {
(document.activeElement as HTMLElement).blur() ;(document.activeElement as HTMLElement).blur()
setPreviewAction({ setPreviewAction({
origin: playerInfo.id, origin: playerInfo.id,

@ -17,7 +17,12 @@ export default function LoginApp() {
const email = emailRef.current!.value const email = emailRef.current!.value
const password = passwordRef.current!.value const password = passwordRef.current!.value
const response = await fetchAPI("auth/token", { email, password }, "POST", false) const response = await fetchAPI(
"auth/token",
{ email, password },
"POST",
false,
)
if (response.ok) { if (response.ok) {
const session = getSession() const session = getSession()
@ -29,7 +34,14 @@ export default function LoginApp() {
// if unauthorized : // if unauthorized :
if (response.status === 401) { if (response.status === 401) {
setErrors([{ type: "Non autorisé", messages: ["L'adresse email ou le mot de passe sont invalide."] }]) setErrors([
{
type: "Non autorisé",
messages: [
"L'adresse email ou le mot de passe sont invalide.",
],
},
])
return return
} }

@ -19,8 +19,6 @@ export function Header() {
return return
} }
console.log(session)
//TODO check if the response is ok and handle errors //TODO check if the response is ok and handle errors
const { name: username } = await response.json() const { name: username } = await response.json()
saveSession({ ...session, username }) saveSession({ ...session, username })

@ -6,7 +6,7 @@ import svgr from "vite-plugin-svgr"
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
build: { build: {
target: 'es2023', target: "es2023",
}, },
plugins: [ plugins: [
react(), react(),

Loading…
Cancel
Save