We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f34f29d + 48db6f9 commit 344ee51Copy full SHA for 344ee51
src/renderer/routes/Accounts.tsx
@@ -173,9 +173,20 @@ export const AccountsRoute: FC = () => {
173
type="button"
174
className={cn(BUTTON_CLASS_NAME, 'px-0')}
175
title={`Refresh ${account.user.login}`}
176
- onClick={async () => {
+ onClick={async (e) => {
177
+ const button = e.currentTarget;
178
+ button.classList.add('animate-spin');
179
+
180
await refreshAccount(account);
181
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);
190
}}
191
>
192
<SyncIcon
0 commit comments