From 455afe0bc70a537ac22a87465dabb6a4ecb4f1d2 Mon Sep 17 00:00:00 2001 From: Afonsos4ntos Date: Wed, 12 Jul 2023 12:03:52 +0100 Subject: [PATCH] correct some erros --- apps/app/components/LectureForm/index.js | 2 +- apps/app/components/Profile/index.tsx | 4 +--- apps/app/pages/admin/lectures/presences/index.tsx | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/app/components/LectureForm/index.js b/apps/app/components/LectureForm/index.js index 248bc5ca..6479c29d 100644 --- a/apps/app/components/LectureForm/index.js +++ b/apps/app/components/LectureForm/index.js @@ -71,7 +71,7 @@ export default function LectureForm({ id }) { ) ); }); - }, [events]); + }, [events, fetchData]); const [filteredNinjas, setFilteredNinjas] = useState([]); const handleEventChange = useCallback( diff --git a/apps/app/components/Profile/index.tsx b/apps/app/components/Profile/index.tsx index 8a272585..74325380 100644 --- a/apps/app/components/Profile/index.tsx +++ b/apps/app/components/Profile/index.tsx @@ -23,10 +23,9 @@ import { EUser, getNinjasAsAdmin, updateGuardianAsAdmin } from "bokkenjs"; import Link from "next/link"; import { getIcon } from "~/lib/utils"; - const { TabPane } = Tabs; -const { Title,Text } = Typography; +const { Title, Text } = Typography; interface Props { id: string; @@ -209,7 +208,6 @@ function Profile({ id, role }: Props) { - z diff --git a/apps/app/pages/admin/lectures/presences/index.tsx b/apps/app/pages/admin/lectures/presences/index.tsx index ffef9332..84955843 100644 --- a/apps/app/pages/admin/lectures/presences/index.tsx +++ b/apps/app/pages/admin/lectures/presences/index.tsx @@ -75,7 +75,7 @@ export default function Presences() { "Não foi possível atualizar os dados da sessão" ); }); - }, []); + }, [data, selectedLectures]); useEffect(() => { api @@ -125,7 +125,7 @@ export default function Presences() { useEffect(() => { generateData(); - }, [selectedLectures]); + }); selectedLectures.map((lecture: any) => { if (lecture.attendance == null) {