From e350a1641f2674a0738c7e8bc73a345fc8b0b9e9 Mon Sep 17 00:00:00 2001 From: yoelmarain Date: Fri, 27 Sep 2024 20:10:49 -0300 Subject: [PATCH] Refactor sidebar link color logic --- FrontAdmin/src/components/NavBar/SidebarContent.tsx | 3 +++ .../src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx | 1 + 2 files changed, 4 insertions(+) diff --git a/FrontAdmin/src/components/NavBar/SidebarContent.tsx b/FrontAdmin/src/components/NavBar/SidebarContent.tsx index cc82613..a93b33a 100644 --- a/FrontAdmin/src/components/NavBar/SidebarContent.tsx +++ b/FrontAdmin/src/components/NavBar/SidebarContent.tsx @@ -50,6 +50,9 @@ export function SidebarContent({ onClose, LINK_ITEMS, ...rest }: SidebarProps) { title={link.title} color={ location.pathname.startsWith('/admin/' + link.url) + ? 'secundary' + : + location.pathname.startsWith('/alumnos/' + link.url) ? 'secundary' : 'white' } diff --git a/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx b/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx index 21edc12..ddb4921 100644 --- a/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx +++ b/FrontAdmin/src/components/Pages-Alumnos/InformarPago/DrawerPago.tsx @@ -81,6 +81,7 @@ const DrawerInformar: React.FC = ({ isOpen, onClose, cuotas window.open(googleFormUrl, '_blank'); showToast('Pago informado', 'El pago se ha informado correctamente, continuar en el google forms', 'success'); + // onRefresh(); } catch (error) { console.error('Error:', error);