From 5690d613bbf1d977eac8103a25928c3cc4906e6c Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 25 May 2024 17:17:21 +0530 Subject: [PATCH] tsc --- web/apps/auth/src/pages/change-password.tsx | 2 +- web/apps/auth/src/pages/two-factor/setup.tsx | 2 +- web/apps/photos/src/components/Sidebar/index.tsx | 7 ++++--- web/packages/shared/components/DialogBoxV2/index.tsx | 4 +++- web/packages/shared/themes/palette/index.tsx | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/web/apps/auth/src/pages/change-password.tsx b/web/apps/auth/src/pages/change-password.tsx index f84efa4c6..cc0bfe472 100644 --- a/web/apps/auth/src/pages/change-password.tsx +++ b/web/apps/auth/src/pages/change-password.tsx @@ -7,6 +7,6 @@ import React, { useContext } from "react"; const Page: React.FC = () => { const appContext = ensure(useContext(AppContext)); return ; -} +}; export default Page; diff --git a/web/apps/auth/src/pages/two-factor/setup.tsx b/web/apps/auth/src/pages/two-factor/setup.tsx index 3b3fe7d93..5ef376776 100644 --- a/web/apps/auth/src/pages/two-factor/setup.tsx +++ b/web/apps/auth/src/pages/two-factor/setup.tsx @@ -7,6 +7,6 @@ import React, { useContext } from "react"; const Page: React.FC = () => { const appContext = ensure(useContext(AppContext)); return ; -} +}; export default Page; diff --git a/web/apps/photos/src/components/Sidebar/index.tsx b/web/apps/photos/src/components/Sidebar/index.tsx index a59c36b14..c01ffe48b 100644 --- a/web/apps/photos/src/components/Sidebar/index.tsx +++ b/web/apps/photos/src/components/Sidebar/index.tsx @@ -157,9 +157,9 @@ const UserDetailsSection: React.FC = ({ }) => { const galleryContext = useContext(GalleryContext); - const [userDetails, setUserDetails] = useLocalState( - LS_KEYS.USER_DETAILS, - ); + const [userDetails, setUserDetails] = useLocalState< + UserDetails | undefined + >(LS_KEYS.USER_DETAILS, undefined); const [memberSubscriptionManageView, setMemberSubscriptionManageView] = useState(false); @@ -198,6 +198,7 @@ const UserDetailsSection: React.FC = ({ openMemberSubscriptionManage(); } else { if ( + userDetails && hasStripeSubscription(userDetails.subscription) && isSubscriptionPastDue(userDetails.subscription) ) { diff --git a/web/packages/shared/components/DialogBoxV2/index.tsx b/web/packages/shared/components/DialogBoxV2/index.tsx index 3f318594e..a0e226c87 100644 --- a/web/packages/shared/components/DialogBoxV2/index.tsx +++ b/web/packages/shared/components/DialogBoxV2/index.tsx @@ -96,7 +96,9 @@ export default function DialogBoxV2({ size="large" color={attributes.proceed?.variant} onClick={async () => { - await attributes.proceed?.action(setLoading); + await attributes.proceed?.action( + setLoading, + ); onClose(); }} diff --git a/web/packages/shared/themes/palette/index.tsx b/web/packages/shared/themes/palette/index.tsx index 14d33eb74..81d6cd598 100644 --- a/web/packages/shared/themes/palette/index.tsx +++ b/web/packages/shared/themes/palette/index.tsx @@ -1,6 +1,6 @@ +import { ensure } from "@/utils/ensure"; import type { PaletteOptions, ThemeColorsOptions } from "@mui/material"; import { THEME_COLOR } from "../constants"; -import { ensure } from "@/utils/ensure"; export const getPallette = ( themeColor: THEME_COLOR,