Add error logging and Suspense component

Added error logging to the i18n client initialization to better handle and trace errors. Introduced React's Suspense component in `root-providers.tsx` to provide a fallback UI in case a component within the tree is not yet ready to render.
This commit is contained in:
giancarlo
2024-04-16 15:36:23 +08:00
parent eaa163935b
commit 76520a35b6
2 changed files with 20 additions and 15 deletions

View File

@@ -43,6 +43,7 @@ export function initializeI18nClient(
},
(err) => {
if (err) {
console.error('Error initializing i18n client', err);
return reject(err);
}