From b9d1880951a67139d259578dfd597e7707179be4 Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Wed, 22 Apr 2026 15:13:07 +0530 Subject: [PATCH] fix: handle type errors in build --- frontend/src/components/ui/LetterItem.tsx | 2 +- frontend/src/hooks/useLetters.tsx | 2 +- frontend/src/pages/Drawer.tsx | 2 +- frontend/src/pages/Reader.test.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/ui/LetterItem.tsx b/frontend/src/components/ui/LetterItem.tsx index 61a5ac1..0c1cd58 100644 --- a/frontend/src/components/ui/LetterItem.tsx +++ b/frontend/src/components/ui/LetterItem.tsx @@ -1,4 +1,4 @@ -import { LockIcon, LockKeyOpenIcon, LockOpenIcon } from "@phosphor-icons/react"; +import { LockIcon, LockKeyOpenIcon } from "@phosphor-icons/react"; import { useNavigate } from "react-router-dom"; import { PATHS } from "../../config/routes"; diff --git a/frontend/src/hooks/useLetters.tsx b/frontend/src/hooks/useLetters.tsx index 8ab1fe2..be33475 100644 --- a/frontend/src/hooks/useLetters.tsx +++ b/frontend/src/hooks/useLetters.tsx @@ -10,7 +10,7 @@ export interface Letter { status: "DRAFT" | "SEALED" | "BURNED"; updated_at: string; sealed_at?: string; - unlock_at?: string; + unlock_at: string; encrypted_metadata: string; encrypted_content: string; encrypted_dek: string; diff --git a/frontend/src/pages/Drawer.tsx b/frontend/src/pages/Drawer.tsx index c972d11..608aa4a 100644 --- a/frontend/src/pages/Drawer.tsx +++ b/frontend/src/pages/Drawer.tsx @@ -175,7 +175,7 @@ export default function Drawer() { id={letter.public_id} preview={letter.metadata?.recipient || "Future Self"} timestamp={formatRelativeDate(letter.updated_at)} - unlock_at={formateRelativeDateWithoutTime(letter.unlock_at)} + unlock_at={formateRelativeDateWithoutTime(letter.unlock_at || "")} isLocked={letter.unlock_at > new Date().toISOString()} /> ))} diff --git a/frontend/src/pages/Reader.test.tsx b/frontend/src/pages/Reader.test.tsx index 30b2c1e..4c49b79 100644 --- a/frontend/src/pages/Reader.test.tsx +++ b/frontend/src/pages/Reader.test.tsx @@ -69,7 +69,7 @@ describe("Reader Page", () => { }), ); - const {container} = render( + render( } />