add linter

This commit is contained in:
Romulus21
2024-02-18 23:30:50 +01:00
parent b53d378ec1
commit ebfc56eba3
34 changed files with 568 additions and 262 deletions

View File

@@ -1,11 +1,9 @@
import React, {FC, useEffect, useState} from "react";
import useAxiosTools from "../../hooks/AxiosTools";
import {toDo} from "../../utilities/types";
import {Link} from "react-router-dom";
import useTracker from "../../hooks/TraskerHook";
import {Simulate} from "react-dom/test-utils";
import load = Simulate.load;
import {DraggableSVG, PauseSVG, PlaySVG} from "../SVG";
import React, {FC, useEffect, useState} from "react"
import useAxiosTools from "../../hooks/AxiosTools"
import {toDo} from "../../utilities/types"
import {Link} from "react-router-dom"
import useTracker from "../../hooks/TraskerHook"
import {DraggableSVG, PauseSVG, PlaySVG} from "../SVG"
const ToDoIndex: FC<ToDoIndexProps> = ({reload, setReload}) => {
@@ -21,7 +19,7 @@ const ToDoIndex: FC<ToDoIndexProps> = ({reload, setReload}) => {
if (reload && !loading) {
fetchToDos()
}
}, [reload]);
}, [reload])
const fetchToDos = async () => {
try {
@@ -57,18 +55,18 @@ const ToDoIndex: FC<ToDoIndexProps> = ({reload, setReload}) => {
onChange={() =>toggleCheck(toDo)}
className=""/>
<Link to={"/todos/" + toDo.id}
className={`${toDo.checked ? 'line-through' : ''} flex-1 flex justify-between`}>
className={`${toDo.checked ? 'line-through' : ''} flex flex-1 justify-between`}>
<span>{toDo.name}</span>
<span className="text-gray-400 text-md mr-2">{toDo.duration.durationify()}</span>
<span className="mr-2 text-sm text-gray-400">{toDo.duration.durationify()}</span>
</Link>
{toDo.id === currentTimeTracker?.to_do?.id
? <button className="cursor-pointer w-7 justify-center flex items-center"
? <button className="flex w-7 cursor-pointer items-center justify-center"
type="button"
title="Commencer"
onClick={stopCurrentTimeTrack}>
<PauseSVG className="w-7"/>
</button>
: <button className="cursor-pointer w-7 justify-center flex items-center"
: <button className="flex w-7 cursor-pointer items-center justify-center"
type="button"
title="Commencer"
onClick={() => startTrackToDo(toDo)}>