move collection constants to constants/collection

This commit is contained in:
Abhinav 2022-01-04 16:54:39 +05:30
parent dfdf2897d4
commit 5a84003388
6 changed files with 18 additions and 12 deletions

View file

@ -15,7 +15,7 @@ import {
ALL_SECTION, ALL_SECTION,
ARCHIVE_SECTION, ARCHIVE_SECTION,
TRASH_SECTION, TRASH_SECTION,
} from './pages/gallery/Collections'; } from 'constants/collection';
import { isSharedFile } from 'utils/file'; import { isSharedFile } from 'utils/file';
import { isPlaybackPossible } from 'utils/photoFrame'; import { isPlaybackPossible } from 'utils/photoFrame';
import { PhotoList } from './PhotoList'; import { PhotoList } from './PhotoList';

View file

@ -32,10 +32,7 @@ import InProgressIcon from './icons/InProgressIcon';
import exportService from 'services/exportService'; import exportService from 'services/exportService';
import { Subscription } from 'types/billing'; import { Subscription } from 'types/billing';
import { PAGES } from 'constants/pages'; import { PAGES } from 'constants/pages';
import { import { ARCHIVE_SECTION, TRASH_SECTION } from 'constants/collection';
ARCHIVE_SECTION,
TRASH_SECTION,
} from 'components/pages/gallery/Collections';
import FixLargeThumbnails from './FixLargeThumbnail'; import FixLargeThumbnails from './FixLargeThumbnail';
import { SetLoading } from 'types/gallery'; import { SetLoading } from 'types/gallery';
interface Props { interface Props {

View file

@ -22,10 +22,11 @@ import { SetCollectionNamerAttributes } from './CollectionNamer';
import CollectionOptions from './CollectionOptions'; import CollectionOptions from './CollectionOptions';
import CollectionSort from './CollectionSort'; import CollectionSort from './CollectionSort';
import OptionIcon, { OptionIconWrapper } from './OptionIcon'; import OptionIcon, { OptionIconWrapper } from './OptionIcon';
import {
export const ARCHIVE_SECTION = -1; ALL_SECTION,
export const TRASH_SECTION = -2; ARCHIVE_SECTION,
export const ALL_SECTION = 0; TRASH_SECTION,
} from 'constants/collection';
interface CollectionProps { interface CollectionProps {
collections: Collection[]; collections: Collection[];

View file

@ -11,7 +11,11 @@ import constants from 'utils/strings/constants';
import Archive from 'components/icons/Archive'; import Archive from 'components/icons/Archive';
import MoveIcon from 'components/icons/MoveIcon'; import MoveIcon from 'components/icons/MoveIcon';
import { COLLECTION_OPS_TYPE } from 'utils/collection'; import { COLLECTION_OPS_TYPE } from 'utils/collection';
import { ALL_SECTION, ARCHIVE_SECTION, TRASH_SECTION } from './Collections'; import {
ALL_SECTION,
ARCHIVE_SECTION,
TRASH_SECTION,
} from 'constants/collection';
import UnArchive from 'components/icons/UnArchive'; import UnArchive from 'components/icons/UnArchive';
import { OverlayTrigger } from 'react-bootstrap'; import { OverlayTrigger } from 'react-bootstrap';
import { Collection } from 'types/collection'; import { Collection } from 'types/collection';

View file

@ -0,0 +1,3 @@
export const ARCHIVE_SECTION = -1;
export const TRASH_SECTION = -2;
export const ALL_SECTION = 0;

View file

@ -64,11 +64,11 @@ import AlertBanner from 'components/pages/gallery/AlertBanner';
import UploadButton from 'components/pages/gallery/UploadButton'; import UploadButton from 'components/pages/gallery/UploadButton';
import PlanSelector from 'components/pages/gallery/PlanSelector'; import PlanSelector from 'components/pages/gallery/PlanSelector';
import Upload from 'components/pages/gallery/Upload'; import Upload from 'components/pages/gallery/Upload';
import Collections, { import {
ALL_SECTION, ALL_SECTION,
ARCHIVE_SECTION, ARCHIVE_SECTION,
TRASH_SECTION, TRASH_SECTION,
} from 'components/pages/gallery/Collections'; } from 'constants/collection';
import { AppContext } from 'pages/_app'; import { AppContext } from 'pages/_app';
import { CustomError, ServerErrorCodes } from 'utils/common/errorUtil'; import { CustomError, ServerErrorCodes } from 'utils/common/errorUtil';
import { PAGES } from 'constants/pages'; import { PAGES } from 'constants/pages';
@ -100,6 +100,7 @@ import {
} from 'types/collection'; } from 'types/collection';
import { EnteFile, VISIBILITY_STATE } from 'types/file'; import { EnteFile, VISIBILITY_STATE } from 'types/file';
import { GalleryContextType, SelectedState, Search } from 'types/gallery'; import { GalleryContextType, SelectedState, Search } from 'types/gallery';
import Collections from 'components/pages/gallery/Collections';
export const DeadCenter = styled.div` export const DeadCenter = styled.div`
flex: 1; flex: 1;