diff --git a/src/realm-settings/TokensTab.tsx b/src/realm-settings/TokensTab.tsx index e8f40461a3..8cd1c534c9 100644 --- a/src/realm-settings/TokensTab.tsx +++ b/src/realm-settings/TokensTab.tsx @@ -75,6 +75,12 @@ export const RealmSettingsTokensTab = ({ defaultValue: 36000, }); + const revokeRefreshToken = useWatch({ + control, + name: "revokeRefreshToken", + defaultValue: false, + }); + return ( - - } - fieldId="refreshTokenMaxReuse" - > - ( - onChange(value + 1)} - onMinus={() => onChange(value - 1)} - onChange={(event) => - onChange(Number((event.target as HTMLInputElement).value)) - } + {revokeRefreshToken && ( + - )} - /> - + } + fieldId="refreshTokenMaxReuse" + > + ( + onChange(value + 1)} + onMinus={() => onChange(value - 1)} + onChange={(event) => + onChange(Number((event.target as HTMLInputElement).value)) + } + /> + )} + /> + + )}