Skip to content

Commit

Permalink
disable autocomplete and hide invite code under advanced
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Nov 25, 2024
1 parent 5f8db90 commit 7d65e93
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions pages/invites/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,15 @@ function InviteForm () {
onSubmit={async ({ id, gift, limit, description }) => {
const { error } = await createInvite({
variables: {
id,
id: id || undefined,
gift: Number(gift),
limit: limit ? Number(limit) : limit,
description
description: description || undefined
}
})
if (error) throw error
}}
>
<Input
label={<>invite code <small className='text-muted ms-2'>optional</small></>}
name='id'
/>
<Input
label='gift'
name='gift'
Expand All @@ -77,8 +73,22 @@ function InviteForm () {
<Input
label={<>note <small className='text-muted ms-2'>optional</small></>}
name='description'
autocomplete='off'
/>
<AccordianItem
headerColor='#6c757d' header='advanced' body={
<Input
label={<>invite code <small className='text-muted ms-2'>optional</small></>}
name='id'
autocomplete='off'
/>
}
/>
<SubmitButton variant='secondary'>create</SubmitButton>
<SubmitButton
className='mt-4'
variant='secondary'
>create
</SubmitButton>
</Form>
)
}
Expand Down

0 comments on commit 7d65e93

Please sign in to comment.