From cebb213eaa2ece7e00f9990c3faa7c9eab37aa3b Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 9 Nov 2024 15:13:48 +0530 Subject: [PATCH] Tweak --- .../src/components/pages/gallery/PlanSelector.tsx | 13 ++++--------- web/apps/photos/src/pages/gallery.tsx | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx b/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx index 72d057ad0a..760b909f21 100644 --- a/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx +++ b/web/apps/photos/src/components/pages/gallery/PlanSelector.tsx @@ -62,14 +62,14 @@ import { Trans } from "react-i18next"; import { SetLoading } from "types/gallery"; type PlanSelectorProps = ModalVisibilityProps & { - setLoading: SetLoading; + setLoading: (loading: boolean) => void; }; -const PlanSelector: React.FC = ({ +export const PlanSelector: React.FC = ({ open, onClose, setLoading, -}: PlanSelectorProps) => { +}) => { const fullScreen = useMediaQuery(useTheme().breakpoints.down("sm")); if (!open) { @@ -92,12 +92,7 @@ const PlanSelector: React.FC = ({ ); }; -export default PlanSelector; - -interface PlanSelectorCardProps { - onClose: () => void; - setLoading: SetLoading; -} +type PlanSelectorCardProps = Pick; const PlanSelectorCard: React.FC = ({ onClose, diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx index 0f75fb4f4f..c3c8051720 100644 --- a/web/apps/photos/src/pages/gallery.tsx +++ b/web/apps/photos/src/pages/gallery.tsx @@ -104,7 +104,7 @@ import Sidebar from "components/Sidebar"; import { type UploadTypeSelectorIntent } from "components/Upload/UploadTypeSelector"; import Uploader from "components/Upload/Uploader"; import { UploadSelectorInputs } from "components/UploadSelectorInputs"; -import PlanSelector from "components/pages/gallery/PlanSelector"; +import { PlanSelector } from "components/pages/gallery/PlanSelector"; import SelectedFileOptions from "components/pages/gallery/SelectedFileOptions"; import { t } from "i18next"; import { useRouter, type NextRouter } from "next/router"; @@ -910,7 +910,7 @@ export default function Gallery() { )} setBlockingLoad(v)} />