-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update lazy load of pages, improve UX
1. Update app.config.js — pages components are inported here 2. Add suspense component into every route of App 3. Add CenteredSpinner component for fallback, also for chat while it fetching 4. Remove pages/index.js
- Loading branch information
1 parent
5897405
commit 426801e
Showing
5 changed files
with
55 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Spinner } from 'react-bootstrap'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
const CenteredSpinner = () => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<div className="d-flex justify-content-center align-items-center h-100"> | ||
<Spinner animation="border" variant="primary"> | ||
<span className="visually-hidden">{t('processes.loading')}</span> | ||
</Spinner> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CenteredSpinner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.