diff --git a/src/pages/gallery/components/AlertBanner.tsx b/src/pages/gallery/components/AlertBanner.tsx index a33af1e2d..33e251ba8 100644 --- a/src/pages/gallery/components/AlertBanner.tsx +++ b/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: