@@ -8,7 +8,11 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
88export function CommitSigningSettings ( ) {
99 const trpc = useHostTRPC ( ) ;
1010 const queryClient = useQueryClient ( ) ;
11- const statusQuery = useQuery ( trpc . signingAccess . getStatus . queryOptions ( ) ) ;
11+ const {
12+ data : status ,
13+ error : statusError ,
14+ isLoading : isStatusLoading ,
15+ } = useQuery ( trpc . signingAccess . getStatus . queryOptions ( ) ) ;
1216 const setEnabledMutation = useMutation (
1317 trpc . signingAccess . setEnabled . mutationOptions ( {
1418 onSuccess : ( status ) => {
@@ -23,11 +27,10 @@ export function CommitSigningSettings() {
2327 trpc . os . openExternal . mutationOptions ( ) ,
2428 ) ;
2529 const { copied, copy } = useCopy ( ) ;
26- const status = statusQuery . data ;
2730 const publicKey = status ?. publicKey ;
2831 const error =
2932 status ?. error ??
30- ( statusQuery . error instanceof Error ? statusQuery . error . message : null ) ??
33+ ( statusError instanceof Error ? statusError . message : null ) ??
3134 ( setEnabledMutation . error instanceof Error
3235 ? setEnabledMutation . error . message
3336 : null ) ;
@@ -58,7 +61,7 @@ export function CommitSigningSettings() {
5861 label = "Managed Secure Enclave signing"
5962 description = "Use a hardware-backed, non-exportable key for commits created by local Claude and Codex sessions."
6063 >
61- { statusQuery . isLoading ? (
64+ { isStatusLoading ? (
6265 < Spinner size = "1" />
6366 ) : (
6467 < Switch
0 commit comments