From 6295cbe98e1e5cf19aa3712236977648861022b6 Mon Sep 17 00:00:00 2001 From: EduardZaydler <117674342+EduardZaydler@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:33:34 +0700 Subject: [PATCH] review --- src/Components/TeamsList/TeamsList.tsx | 30 +++++++++++--------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/Components/TeamsList/TeamsList.tsx b/src/Components/TeamsList/TeamsList.tsx index 935f099f..c9ed4ee5 100644 --- a/src/Components/TeamsList/TeamsList.tsx +++ b/src/Components/TeamsList/TeamsList.tsx @@ -6,24 +6,18 @@ import { Team } from "../../Domain/Team"; export const TeamsList: FC<{ teams?: Team[] }> = ({ teams }) => { const [deletingTeam, setDeletingTeam] = useState(null); - + if (!teams?.length) return ; return ( - <> - {teams?.length ? ( - - {teams?.map((team) => ( - setDeletingTeam(team)} - onCloseDelete={() => setDeletingTeam(null)} - /> - ))} - - ) : ( - - )} - + + {teams?.map((team) => ( + setDeletingTeam(team)} + onCloseDelete={() => setDeletingTeam(null)} + /> + ))} + ); };