Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Rename

Manav Rathi2ae8a1113855
diff --git a/web/apps/photos/src/components/Collections/AllCollections/header.tsx b/web/apps/photos/src/components/Collections/AllCollections/header.tsx
index a05a76313c..dc7caa5f91 100644
--- a/web/apps/photos/src/components/Collections/AllCollections/header.tsx
+++ b/web/apps/photos/src/components/Collections/AllCollections/header.tsx
@@ -5,7 +5,7 @@ import {
} from "@ente/shared/components/Container";
import Close from "@mui/icons-material/Close";
import { Box, DialogTitle, Stack, Typography } from "@mui/material";
-import CollectionListSortBy from "components/Collections/CollectionListSortBy";
+import CollectionListSortOptions from "components/Collections/CollectionListSortBy";
import { t } from "i18next";
export default function AllCollectionsHeader({
@@ -31,7 +31,7 @@ export default function AllCollectionsHeader({
</Box>
</FluidContainer>
<Stack direction="row" spacing={1.5}>
- <CollectionListSortBy
+ <CollectionListSortOptions
activeSortBy={collectionSortBy}
setSortBy={setCollectionSortBy}
nestedInDialog
diff --git a/web/apps/photos/src/components/Collections/CollectionListBar.tsx b/web/apps/photos/src/components/Collections/CollectionListBar.tsx
index 563079b24b..46d616bcba 100644
--- a/web/apps/photos/src/components/Collections/CollectionListBar.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionListBar.tsx
@@ -33,7 +33,7 @@ import AutoSizer from "react-virtualized-auto-sizer";
import { FixedSizeList, ListChildComponentProps, areEqual } from "react-window";
import { COLLECTION_LIST_SORT_BY } from "utils/collection";
import type { GalleryBarMode } from ".";
-import CollectionListSortBy from "./CollectionListSortBy";
+import { CollectionListSortOptions } from "./CollectionListSortOptions";
export interface CollectionListBarProps {
/**
@@ -200,7 +200,7 @@ export const CollectionListBar: React.FC<CollectionListBarProps> = ({
const controls1 = isMobile && (
<Box display="flex" alignItems={"center"} gap={1}>
- <CollectionListSortBy
+ <CollectionListSortOptions
setSortBy={setCollectionListSortBy}
activeSortBy={collectionListSortBy}
disableBG
@@ -213,7 +213,7 @@ export const CollectionListBar: React.FC<CollectionListBarProps> = ({
const controls2 = !isMobile && (
<Box display="flex" alignItems={"center"} gap={1} height={"64px"}>
- <CollectionListSortBy
+ <CollectionListSortOptions
setSortBy={setCollectionListSortBy}
activeSortBy={collectionListSortBy}
/>
diff --git a/web/apps/photos/src/components/Collections/CollectionListSortBy.tsx b/web/apps/photos/src/components/Collections/CollectionListSortOptions.tsx
similarity index 91%
rename from web/apps/photos/src/components/Collections/CollectionListSortBy.tsx
rename to web/apps/photos/src/components/Collections/CollectionListSortOptions.tsx
index 308ea57437..152d8cf561 100644
--- a/web/apps/photos/src/components/Collections/CollectionListSortBy.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionListSortOptions.tsx
@@ -6,7 +6,7 @@ import SvgIcon from "@mui/material/SvgIcon";
import { t } from "i18next";
import { COLLECTION_LIST_SORT_BY } from "utils/collection";
-interface CollectionSortProps {
+interface CollectionListSortOptionsProps {
setSortBy: (sortBy: COLLECTION_LIST_SORT_BY) => void;
activeSortBy: COLLECTION_LIST_SORT_BY;
nestedInDialog?: boolean;
@@ -14,7 +14,7 @@ interface CollectionSortProps {
}
const SortByOptionCreator =
- ({ setSortBy, activeSortBy }: CollectionSortProps) =>
+ ({ setSortBy, activeSortBy }: CollectionListSortOptionsProps) =>
(props: { sortBy: COLLECTION_LIST_SORT_BY; children: any }) => {
const handleClick = () => {
setSortBy(props.sortBy);
@@ -32,7 +32,9 @@ const SortByOptionCreator =
);
};
-export default function CollectionListSortBy(props: CollectionSortProps) {
+export const CollectionListSortOptions: React.FC<
+ CollectionListSortOptionsProps
+> = (props) => {
const SortByOption = SortByOptionCreator(props);
return (
@@ -68,4 +70,4 @@ export default function CollectionListSortBy(props: CollectionSortProps) {
</SortByOption>
</OverflowMenu>
);
-}
+};