renamed archive collection to archive section

This commit is contained in:
abhinav-grd 2021-09-22 11:39:22 +05:30
parent e067b7260b
commit b45b6af9e1
3 changed files with 7 additions and 10 deletions

View file

@ -29,7 +29,7 @@ import {
SPACE_BTW_DATES,
} from 'types';
import { fileIsArchived } from 'utils/file';
import { ARCHIVE_COLLECTION } from './pages/gallery/Collections';
import { ARCHIVE_SECTION } from './pages/gallery/Collections';
const NO_OF_PAGES = 2;
const A_DAY = 24 * 60 * 60 * 1000;
@ -407,10 +407,7 @@ const PhotoFrame = ({
if (activeCollection === 0 && fileIsArchived(item)) {
return false;
}
if (
activeCollection === ARCHIVE_COLLECTION &&
!fileIsArchived(item)
) {
if (activeCollection === ARCHIVE_SECTION && !fileIsArchived(item)) {
return false;
}

View file

@ -32,7 +32,7 @@ import InProgressIcon from './icons/InProgressIcon';
import exportService from 'services/exportService';
import { Subscription } from 'services/billingService';
import { PAGES } from 'types';
import { ARCHIVE_COLLECTION } from 'components/pages/gallery/Collections';
import { ARCHIVE_SECTION } from 'components/pages/gallery/Collections';
interface Props {
collections: Collection[];
setDialogMessage: SetDialogMessage;
@ -285,7 +285,7 @@ export default function Sidebar(props: Props) {
<LinkButton
style={{ marginTop: '30px' }}
onClick={() => {
galleryContext.setActiveCollection(ARCHIVE_COLLECTION);
galleryContext.setActiveCollection(ARCHIVE_SECTION);
setIsOpen(false);
}}>
{constants.ARCHIVE}

View file

@ -16,7 +16,7 @@ import { SetCollectionNamerAttributes } from './CollectionNamer';
import CollectionOptions from './CollectionOptions';
import OptionIcon, { OptionIconWrapper } from './OptionIcon';
export const ARCHIVE_COLLECTION = -1;
export const ARCHIVE_SECTION = -1;
export const ALL_SECTION = 0;
interface CollectionProps {
@ -221,8 +221,8 @@ export default function Collections(props: CollectionProps) {
</OverlayTrigger>
))}
<Chip
active={activeCollection === ARCHIVE_COLLECTION}
onClick={clickHandler(ARCHIVE_COLLECTION)}>
active={activeCollection === ARCHIVE_SECTION}
onClick={clickHandler(ARCHIVE_SECTION)}>
{constants.ARCHIVE}
<div
style={{