Service Accounts: Allow unsetting token expiry date (#65862)

* Fix: toggle to switch between no expiry

* Remove redudant curly brace
This commit is contained in:
Kousik Mitra 2023-04-04 15:16:10 +05:30 committed by GitHub
parent 673aee30c2
commit 1c6f8fd902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,16 +109,14 @@ export const CreateTokenModal = ({ isOpen, token, serviceAccountLogin, onCreateT
}}
/>
</Field>
{!isWithExpirationDate && (
<Field label="Expiration">
<RadioButtonGroup
options={EXPIRATION_OPTIONS}
value={isWithExpirationDate}
onChange={setIsWithExpirationDate}
size="md"
/>
</Field>
)}
<Field label="Expiration">
<RadioButtonGroup
options={EXPIRATION_OPTIONS}
value={isWithExpirationDate}
onChange={setIsWithExpirationDate}
size="md"
/>
</Field>
{isWithExpirationDate && (
<Field label="Expiration date">
<DatePickerWithInput