From 9278aaf89ca119603ee387f390922283b9c4d78c Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Thu, 14 Dec 2023 13:08:46 -0300 Subject: [PATCH] Fix typo in frontend --- README.md | 2 +- browser-domain/src/components/Home/Card/Card.tsx | 15 ++++++--------- browser-domain/src/components/LogIn/LogIn.tsx | 2 -- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7e512c7..e4baa6f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Contiene `user-manager` con su base de datos. Maneja la autenticación y autoriz ### browser-domain -SPA que tiene dos flujos dependiendo si el usuario es una aerolínea o un usuario normal. +SPA que tiene tres flujos dependiendo si el usuario es una aerolínea, un usuario normal o un admin. ### flights-domain diff --git a/browser-domain/src/components/Home/Card/Card.tsx b/browser-domain/src/components/Home/Card/Card.tsx index d79a120..8527540 100644 --- a/browser-domain/src/components/Home/Card/Card.tsx +++ b/browser-domain/src/components/Home/Card/Card.tsx @@ -71,9 +71,7 @@ export const Card: React.FC = ({ flight, user, subscribed, refresh, r .then(() => { refreshFlights() }) - .catch((error) => { - // console.log(error) - }); + .catch((error) => { }); }; const handleModalClose = () => { @@ -97,9 +95,7 @@ export const Card: React.FC = ({ flight, user, subscribed, refresh, r .then(() => { refresh() }) - .catch((error) => { - // console.log(error) - }); + .catch((error) => { }); }; return ( @@ -137,9 +133,9 @@ export const Card: React.FC = ({ flight, user, subscribed, refresh, r Flight ID: {flight.id} - {((!isAirline && !isAdmin) || ((user && flight.user_id == user.id) || isAdmin)) &&

} + {(user && ((!isAirline && !isAdmin) || ((flight.user_id == user.id) || isAdmin))) &&

} - {!isAirline && !isAdmin ? + {user && (!isAirline && !isAdmin ? ( !(subscribed) ? @@ -156,7 +152,7 @@ export const Card: React.FC = ({ flight, user, subscribed, refresh, r ) : ( - (user && flight.user_id == user.id) || isAdmin ? + (flight.user_id == user.id) || isAdmin ?