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,
ARCHIVE_SECTION,
TRASH_SECTION,
} from './pages/gallery/Collections';
} from 'constants/collection';
import { isSharedFile } from 'utils/file';
import { isPlaybackPossible } from 'utils/photoFrame';
import { PhotoList } from './PhotoList';

View file

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

View file

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

View file

@ -11,7 +11,11 @@ import constants from 'utils/strings/constants';
import Archive from 'components/icons/Archive';
import MoveIcon from 'components/icons/MoveIcon';
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 { OverlayTrigger } from 'react-bootstrap';
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 PlanSelector from 'components/pages/gallery/PlanSelector';
import Upload from 'components/pages/gallery/Upload';
import Collections, {
import {
ALL_SECTION,
ARCHIVE_SECTION,
TRASH_SECTION,
} from 'components/pages/gallery/Collections';
} from 'constants/collection';
import { AppContext } from 'pages/_app';
import { CustomError, ServerErrorCodes } from 'utils/common/errorUtil';
import { PAGES } from 'constants/pages';
@ -100,6 +100,7 @@ import {
} from 'types/collection';
import { EnteFile, VISIBILITY_STATE } from 'types/file';
import { GalleryContextType, SelectedState, Search } from 'types/gallery';
import Collections from 'components/pages/gallery/Collections';
export const DeadCenter = styled.div`
flex: 1;