From 18471f2225433d12003030d542d879a49d67367b Mon Sep 17 00:00:00 2001 From: Felipe Coutinho Date: Fri, 23 Jan 2026 15:41:52 +0000 Subject: [PATCH] =?UTF-8?q?refactor(inbox):=20simplifica=20layout=20e=20fo?= =?UTF-8?q?rmata=C3=A7=C3=A3o=20dos=20componentes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove header duplicado da página (agora no layout) - Melhora formatação do código com linhas mais curtas - Reorganiza imports para consistência --- components/caixa-de-entrada/inbox-card.tsx | 22 ++++++---------------- components/caixa-de-entrada/inbox-page.tsx | 15 ++------------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/components/caixa-de-entrada/inbox-card.tsx b/components/caixa-de-entrada/inbox-card.tsx index 3f36ab6..411b850 100644 --- a/components/caixa-de-entrada/inbox-card.tsx +++ b/components/caixa-de-entrada/inbox-card.tsx @@ -9,8 +9,6 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { formatDistanceToNow } from "date-fns"; -import { ptBR } from "date-fns/locale"; import { RiCheckLine, RiDeleteBinLine, @@ -18,6 +16,8 @@ import { RiMoreLine, RiSmartphoneLine, } from "@remixicon/react"; +import { formatDistanceToNow } from "date-fns"; +import { ptBR } from "date-fns/locale"; import type { InboxItem } from "./types"; interface InboxCardProps { @@ -47,7 +47,7 @@ export function InboxCard({ return ( - +
@@ -95,9 +95,7 @@ export function InboxCard({
- {item.parsedName && ( -

{item.parsedName}

- )} + {item.parsedName &&

{item.parsedName}

}

{item.originalText}

@@ -113,19 +111,11 @@ export function InboxCard({
- -
diff --git a/components/caixa-de-entrada/inbox-page.tsx b/components/caixa-de-entrada/inbox-page.tsx index 874c122..38bb45a 100644 --- a/components/caixa-de-entrada/inbox-page.tsx +++ b/components/caixa-de-entrada/inbox-page.tsx @@ -39,9 +39,9 @@ export function InboxPage({ [...items].sort( (a, b) => new Date(b.notificationTimestamp).getTime() - - new Date(a.notificationTimestamp).getTime() + new Date(a.notificationTimestamp).getTime(), ), - [items] + [items], ); const handleProcessOpenChange = useCallback((open: boolean) => { @@ -99,17 +99,6 @@ export function InboxPage({ return ( <>
-
-
-

Caixa de Entrada

-

- {items.length === 0 - ? "Nenhuma notificação pendente" - : `${items.length} notificação${items.length > 1 ? "ões" : ""} pendente${items.length > 1 ? "s" : ""}`} -

-
-
- {sortedItems.length === 0 ? (