refactor: Update source code with the NPCI and CBS API

This commit is contained in:
2025-08-25 14:21:40 +05:30
parent 78426747e5
commit 671ea780b3
16 changed files with 392 additions and 173 deletions

View File

@@ -32,6 +32,17 @@ export default function RootLayout({ children }: { children: React.ReactNode })
'Authorization': `Bearer ${token}`
},
});
if (!response.ok) {
notifications.show({
withBorder: true,
color: "red",
title: "Error",
message: "Internal Server Error",
autoClose: 5000,
});
localStorage.removeItem("access_token");
return;
}
const data = await response.json();
if (response.ok && Array.isArray(data)) {
if (data.length > 0) {