updated AlertBanner to use errorCodes file
This commit is contained in:
parent
55047a4313
commit
2c705cd665
1 changed files with 5 additions and 8 deletions
|
@ -1,22 +1,19 @@
|
|||
import React from 'react';
|
||||
import { Alert } from 'react-bootstrap';
|
||||
import {
|
||||
ERR_STORAGE_LIMIT_EXCEEDED,
|
||||
ERR_NO_ACTIVE_SUBSRICTION,
|
||||
} from 'services/uploadService';
|
||||
|
||||
import constants from 'utils/strings/constants';
|
||||
import { ERR_NO_INTERNET_CONNECTION } from './CreateCollection';
|
||||
import errorCodes from 'utils/common/errorCodes';
|
||||
|
||||
export default function AlertBanner({ bannerErrorCode }) {
|
||||
let errorMessage;
|
||||
switch (bannerErrorCode) {
|
||||
case ERR_NO_ACTIVE_SUBSRICTION:
|
||||
case errorCodes.ERR_NO_ACTIVE_SUBSRICTION:
|
||||
errorMessage = constants.SUBSCRIPTION_EXPIRED;
|
||||
break;
|
||||
case ERR_STORAGE_LIMIT_EXCEEDED:
|
||||
case errorCodes.ERR_STORAGE_LIMIT_EXCEEDED:
|
||||
errorMessage = constants.STORAGE_QUOTA_EXCEEDED;
|
||||
break;
|
||||
case ERR_NO_INTERNET_CONNECTION:
|
||||
case errorCodes.ERR_NO_INTERNET_CONNECTION:
|
||||
errorMessage = constants.NO_INTERNET_CONNECTION;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue