Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix prop-types dep

Manav Rathi3e4ca320c998
diff --git a/web/apps/photos/src/components/Collections/AllCollections/dialog.tsx b/web/apps/photos/src/components/Collections/AllCollections/dialog.tsx
index bff8302faf..e69de29bb2 100644
--- a/web/apps/photos/src/components/Collections/AllCollections/dialog.tsx
+++ b/web/apps/photos/src/components/Collections/AllCollections/dialog.tsx
@@ -1,35 +0,0 @@
-import { Dialog, styled } from "@mui/material";
-import PropTypes from "prop-types";
-
-export const AllCollectionMobileBreakpoint = 559;
-
-export const AllCollectionDialog = styled(Dialog)<{
- position: "flex-start" | "center" | "flex-end";
-}>(({ theme, position }) => ({
- "& .MuiDialog-container": {
- justifyContent: position,
- },
- "& .MuiPaper-root": {
- maxWidth: "494px",
- },
- "& .MuiDialogTitle-root": {
- padding: theme.spacing(2),
- paddingRight: theme.spacing(1),
- },
- "& .MuiDialogContent-root": {
- padding: theme.spacing(2),
- },
- [theme.breakpoints.down(AllCollectionMobileBreakpoint)]: {
- "& .MuiPaper-root": {
- width: "324px",
- },
- "& .MuiDialogContent-root": {
- padding: 6,
- },
- },
-}));
-
-AllCollectionDialog.propTypes = {
- children: PropTypes.node,
- onClose: PropTypes.func.isRequired,
-};
diff --git a/web/apps/photos/src/components/Collections/AllCollections/index.tsx b/web/apps/photos/src/components/Collections/AllCollections/index.tsx
index e7395768d9..09b59aaa6b 100644
--- a/web/apps/photos/src/components/Collections/AllCollections/index.tsx
+++ b/web/apps/photos/src/components/Collections/AllCollections/index.tsx
@@ -7,13 +7,14 @@ import { FlexWrapper, FluidContainer } from "@ente/shared/components/Container";
import CloseIcon from "@mui/icons-material/Close";
import {
Box,
+ Dialog,
DialogTitle,
Divider,
Stack,
+ styled,
Typography,
useMediaQuery,
} from "@mui/material";
-import { AllCollectionDialog } from "components/Collections/AllCollections/dialog";
import { t } from "i18next";
import AllCollectionContent from "./content";
@@ -46,12 +47,11 @@ export default function AllCollections(props: AllCollectionsProps) {
return (
<AllCollectionDialog
- position="flex-end"
- TransitionComponent={SlideUpTransition}
- onClose={onClose}
open={open}
+ onClose={onClose}
+ TransitionComponent={SlideUpTransition}
fullScreen={isMobile}
- fullWidth={true}
+ fullWidth
>
<AllCollectionsHeader
{...{
@@ -71,6 +71,30 @@ export default function AllCollections(props: AllCollectionsProps) {
);
}
+const AllCollectionDialog = styled(Dialog)(({ theme }) => ({
+ "& .MuiDialog-container": {
+ justifyContent: "flex-end",
+ },
+ "& .MuiPaper-root": {
+ maxWidth: "494px",
+ },
+ "& .MuiDialogTitle-root": {
+ padding: theme.spacing(2),
+ paddingRight: theme.spacing(1),
+ },
+ "& .MuiDialogContent-root": {
+ padding: theme.spacing(2),
+ },
+ [theme.breakpoints.down(559)]: {
+ "& .MuiPaper-root": {
+ width: "324px",
+ },
+ "& .MuiDialogContent-root": {
+ padding: 6,
+ },
+ },
+}));
+
const AllCollectionsHeader = ({
onClose,
collectionCount,
diff --git a/web/packages/build-config/eslintrc-react.mjs b/web/packages/build-config/eslintrc-react.mjs
index 80d43d43f0..b5bbce5993 100644
--- a/web/packages/build-config/eslintrc-react.mjs
+++ b/web/packages/build-config/eslintrc-react.mjs
@@ -27,7 +27,7 @@ export default [
// Otherwise we need to do unnecessary boilerplating when using memo.
"react/display-name": "off",
// Without React in scope, this rule starts causing false positives
- // (We don't use prop types in our own code anyways).
+ // (We don't use prop types in our own code anyways).
"react/prop-types": "off",
},
},