refactor: Update source code with the NPCI and CBS API
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user