feat(mp): add Mercado Pago reauthorization notice and status card components

- Implemented MpReauthNotice component to notify users when reauthorization is needed.
- Created MpStatusCard component to display the current status of the Mercado Pago account.
- Added utility functions and constants for handling Mercado Pago status and messages.
- Introduced hooks for managing the connection and disconnection of Mercado Pago accounts.
- Developed a disconnect confirmation modal for user actions.
- Added tests for the new functionality and utility functions.
- Defined schemas for Mercado Pago account status and callback reasons in shared package.
This commit is contained in:
Jose Selesan
2026-10-07 12:00:38 -03:00
parent e03f510874
commit 21a4c69f38
64 changed files with 3154 additions and 425 deletions

View File

@@ -1,11 +1,12 @@
import { useLocation } from '@tanstack/react-router'
import type { ReactNode } from 'react'
import { ImmersiveBarHost, ImmersiveBarProvider } from '../../context/ImmersiveBarProvider'
import { MpReauthNotice } from '../../features/mp'
import { isImmersiveRoute } from '../../lib/immersive-routes'
import { cn } from '../../lib/utils'
import { BottomNav } from './BottomNav'
import { Header } from './Header'
import { Sidebar } from './Sidebar'
import { BottomNav } from './BottomNav'
export function RootLayout({ children }: { children: ReactNode }) {
const immersive = useLocation({ select: (location) => isImmersiveRoute(location.pathname) })
@@ -31,6 +32,10 @@ export function RootLayout({ children }: { children: ReactNode }) {
)}
>
{immersive ? <ImmersiveBarHost /> : null}
{/* Aviso de que Mercado Pago necesita volver a autorizarse. Va dentro
de <main> para que fluya con el contenido y no tape la barra
immersive ni el bottom nav; se oculta solo en Ajustes. */}
<MpReauthNotice />
{children}
</main>
</ImmersiveBarProvider>