show alert message and loader on first load

This commit is contained in:
Abhinav-grd 2021-02-15 10:47:40 +05:30
parent fcf5d4c3a4
commit 9169e068d1
2 changed files with 7 additions and 2 deletions

View file

@ -30,6 +30,7 @@ import {
} from 'services/collectionService';
import constants from 'utils/strings/constants';
import ErrorAlert from './components/ErrorAlert';
import { Alert } from 'react-bootstrap';
const DATE_CONTAINER_HEIGHT = 45;
const IMAGE_CONTAINER_HEIGHT = 200;
@ -295,9 +296,12 @@ export default function Gallery(props) {
}
};
if (!data || loading) {
if (!data || loading || data.length == 0) {
return (
<div className="text-center">
<Alert variant="primary">
{constants.INITIAL_LOAD_DELAY_WARNING}
</Alert>
<Spinner animation="border" variant="primary" />
</div>
);

View file

@ -63,7 +63,8 @@ const englishConstants = {
'You have exceeded your designated storage Quota, please upgrade your plan to add more files',
WEB_SIGNUPS_DISABLED:
'Web signups are disabled for now, please install the mobile app and signup there',
USER_DOES_NOT_EXIST: 'Incorrect EmailId, No such user exists',
USER_DOES_NOT_EXIST: 'Incorrect emailId, no such user exists',
INITIAL_LOAD_DELAY_WARNING: 'Please wait, intial load may take some time',
};
export default englishConstants;