Browse Source

updated AlertBanner to use errorCodes file

Abhinav-grd 4 năm trước cách đây
mục cha
commit
2c705cd665
1 tập tin đã thay đổi với 5 bổ sung8 xóa
  1. 5 8
      src/pages/gallery/components/AlertBanner.tsx

+ 5 - 8
src/pages/gallery/components/AlertBanner.tsx

@@ -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: