Skip to content

Commit

Permalink
Fixing first task doesn't appering
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelSolVargas committed Jan 20, 2022
1 parent 7985eb8 commit a781e8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ReactFront/src/contexts/tasksContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useLoading } from "./loadingContext";
const tasksContext = createContext();

const TaskProvider = ({ children }) => {
const [tasks, setTasks] = useState([{}])
const [tasks, setTasks] = useState([])
const [taskError, setTaskError] = useState('')
const [tasksLoaded, setTasksLoaded] = useState(false)
const { showLoading, hideLoading } = useLoading()
Expand All @@ -28,6 +28,9 @@ const TaskProvider = ({ children }) => {
setTasksLoaded(true)
hideLoading('Loading Tasks')
}
else {
setTasksLoaded(true)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

Expand Down

0 comments on commit a781e8b

Please sign in to comment.