reload state on sign in (#539)

This commit is contained in:
Gabriel Gordon-Hall
2025-08-20 16:27:52 +01:00
committed by GitHub
parent 6fb7b939d9
commit b35073ae77
2 changed files with 4 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ export function GitHubLoginDialog({
open: boolean;
onOpenChange: (open: boolean) => void;
}) {
const { config, loading, githubTokenInvalid } = useConfig();
const { config, loading, githubTokenInvalid, reloadSystem } = useConfig();
const [fetching, setFetching] = useState(false);
const [error, setError] = useState<string | null>(null);
const [deviceState, setDeviceState] =
@@ -62,6 +62,7 @@ export function GitHubLoginDialog({
setPolling(false);
setDeviceState(null);
setError(null);
await reloadSystem();
onOpenChange(false);
break;
case DevicePollStatus.AUTHORIZATION_PENDING:

View File

@@ -204,6 +204,7 @@ export function useConfig() {
updateAndSaveConfig,
loading,
githubTokenInvalid,
reloadSystem,
} = useUserSystem();
return {
config,
@@ -212,6 +213,7 @@ export function useConfig() {
updateAndSaveConfig,
loading,
githubTokenInvalid,
reloadSystem,
};
}