Skip to content

Commit

Permalink
Bux Fix: Personal Token Submit Refreshes Page
Browse files Browse the repository at this point in the history
  • Loading branch information
SmitGala committed Jan 8, 2025
1 parent 598e261 commit f358f37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
</AkTypography>
</AkStack>

<form {{style width='100%' maxWidth='650px'}} class='my-3'>
<form
{{on 'submit' (perform this.generateToken)}}
{{style width='100%' maxWidth='650px'}}
class='my-3'
>
<AkStack @width='full' @alignItems='center' @spacing='1.5'>
<div {{style flex='1'}}>
<AkTextField
Expand All @@ -19,10 +23,7 @@
/>
</div>

<AkButton
@loading={{this.generateToken.isRunning}}
{{on 'click' (perform this.generateToken)}}
>
<AkButton @loading={{this.generateToken.isRunning}} @type='submit'>
<:leftIcon>
<AkIcon @iconName='add' />
</:leftIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export default class AccountSettingsDeveloperSettingsPersonaltokenListComponent
];
}

generateToken = task(async () => {
generateToken = task(async (event) => {
event.preventDefault();

const tTokenCreated = this.intl.t('personalTokenGenerated');
const tEnterTokenName = this.intl.t('enterTokenName');

Expand Down

0 comments on commit f358f37

Please sign in to comment.