From b45b6af9e1d4e333922e351237d9c9b6f8865718 Mon Sep 17 00:00:00 2001 From: abhinav-grd Date: Wed, 22 Sep 2021 11:39:22 +0530 Subject: [PATCH] renamed archive collection to archive section --- src/components/PhotoFrame.tsx | 7 ++----- src/components/Sidebar.tsx | 4 ++-- src/components/pages/gallery/Collections.tsx | 6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/PhotoFrame.tsx b/src/components/PhotoFrame.tsx index d7d39396f..6ec155abf 100644 --- a/src/components/PhotoFrame.tsx +++ b/src/components/PhotoFrame.tsx @@ -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; } diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index e58d4210d..586f1824b 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -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) { { - galleryContext.setActiveCollection(ARCHIVE_COLLECTION); + galleryContext.setActiveCollection(ARCHIVE_SECTION); setIsOpen(false); }}> {constants.ARCHIVE} diff --git a/src/components/pages/gallery/Collections.tsx b/src/components/pages/gallery/Collections.tsx index 1013c040f..a8d9294a1 100644 --- a/src/components/pages/gallery/Collections.tsx +++ b/src/components/pages/gallery/Collections.tsx @@ -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) { ))} + active={activeCollection === ARCHIVE_SECTION} + onClick={clickHandler(ARCHIVE_SECTION)}> {constants.ARCHIVE}