From ca524dcc2c869fa63a362529ee55b470c313cb1d Mon Sep 17 00:00:00 2001 From: pranalidhanavade Date: Wed, 9 Oct 2024 11:39:34 +0530 Subject: [PATCH] used utility function for handle alert component issue Signed-off-by: pranalidhanavade --- src/components/User/UserDashBoard.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/User/UserDashBoard.tsx b/src/components/User/UserDashBoard.tsx index f5dbe3aeb..06d7958e3 100644 --- a/src/components/User/UserDashBoard.tsx +++ b/src/components/User/UserDashBoard.tsx @@ -451,12 +451,6 @@ const UserDashBoard = () => { ); }; - - const getSafeMessage = (message: string | null, error: string | null): string => { - if (message) return message; // return message if it's not null - if (typeof error === 'string') return error; // return error if it's a string - return ''; // default to an empty string if both are null or error is not a string - }; return ( @@ -464,8 +458,7 @@ const UserDashBoard = () => {
{