refactor: restructure useAppShell context into nested objects

This commit is contained in:
2025-12-10 01:48:46 +01:00
parent 82dcd6d33c
commit f0b58317b9
8 changed files with 123 additions and 93 deletions
+4 -4
View File
@@ -11,10 +11,10 @@ interface SettingsRouteProps {
}
const SettingsRoute: React.FC<SettingsRouteProps> = ({ open = true, onClose }) => {
const shell = useAppShell() as any;
const { token } = shell.session || {};
const { notifyApiError, setStatusMessage } = shell.ui || {};
const {
token,
notifyApiError,
setStatusMessage,
passkeys,
passkeysSupported,
passkeysLoading,
@@ -23,7 +23,7 @@ const SettingsRoute: React.FC<SettingsRouteProps> = ({ open = true, onClose }) =
refreshPasskeys,
registerPasskey,
revokePasskey,
} = useAppShell() as Record<string, any>;
} = shell.passkeys || {};
const {
tokens,