Remove unused method from context

This commit is contained in:
Manav Rathi
2024-10-16 21:32:48 +05:30
parent 833e985d62
commit 0dfcf448ac
3 changed files with 1 additions and 12 deletions

View File

@@ -133,10 +133,6 @@ function PlanSelectorCard(props: PlanSelectorCardProps) {
: PLAN_PERIOD.MONTH,
);
};
function onReopenClick() {
appContext.closeMessageDialog();
galleryContext.showPlanSelectorModal();
}
useEffect(() => {
const main = async () => {
try {

View File

@@ -224,11 +224,6 @@ export default function App({ Component, pageProps }: AppProps) {
}, 100);
};
const closeMessageDialog = useCallback(
() => setMessageDialogView(false),
[],
);
// Use `onGenericError` instead.
const somethingWentWrong = useCallback(
() =>
@@ -253,7 +248,6 @@ export default function App({ Component, pageProps }: AppProps) {
showNavBar,
startLoading, // <- changes on each render (TODO Fix)
finishLoading, // <- changes on each render
closeMessageDialog,
setDialogMessage,
watchFolderView,
setWatchFolderView,
@@ -290,7 +284,7 @@ export default function App({ Component, pageProps }: AppProps) {
sx={{ zIndex: photosDialogZIndex }}
size="xs"
open={messageDialogView}
onClose={closeMessageDialog}
onClose={() => setMessageDialogView(false)}
attributes={dialogMessage}
/>
<AttributedMiniDialog

View File

@@ -21,7 +21,6 @@ export type AppContextT = AccountsContextT & {
somethingWentWrong: () => void;
setDialogMessage: SetDialogBoxAttributes;
setNotificationAttributes: SetNotificationAttributes;
closeMessageDialog: () => void;
mapEnabled: boolean;
updateMapEnabled: (enabled: boolean) => Promise<void>;
watchFolderView: boolean;