Skip to content

Commit 344ee51

Browse files
authored
Merge branch 'main' into feat/pat-scopes-check
2 parents f34f29d + 48db6f9 commit 344ee51

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/renderer/routes/Accounts.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,20 @@ export const AccountsRoute: FC = () => {
173173
type="button"
174174
className={cn(BUTTON_CLASS_NAME, 'px-0')}
175175
title={`Refresh ${account.user.login}`}
176-
onClick={async () => {
176+
onClick={async (e) => {
177+
const button = e.currentTarget;
178+
button.classList.add('animate-spin');
179+
177180
await refreshAccount(account);
178181
navigate('/accounts', { replace: true });
182+
183+
/**
184+
* Typically the above refresh API call completes very quickly,
185+
* so we add an brief artificial delay to allow the icon to spin a few times
186+
*/
187+
setTimeout(() => {
188+
button.classList.remove('animate-spin');
189+
}, 500);
179190
}}
180191
>
181192
<SyncIcon

0 commit comments

Comments
 (0)