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.
1 parent 2404184 commit 48db6f9Copy full SHA for 48db6f9
src/renderer/routes/Accounts.tsx
@@ -153,9 +153,20 @@ export const AccountsRoute: FC = () => {
153
type="button"
154
className={cn(BUTTON_CLASS_NAME, 'px-0')}
155
title={`Refresh ${account.user.login}`}
156
- onClick={async () => {
+ onClick={async (e) => {
157
+ const button = e.currentTarget;
158
+ button.classList.add('animate-spin');
159
+
160
await refreshAccount(account);
161
navigate('/accounts', { replace: true });
162
163
+ /**
164
+ * Typically the above refresh API call completes very quickly,
165
+ * so we add an brief artificial delay to allow the icon to spin a few times
166
+ */
167
+ setTimeout(() => {
168
+ button.classList.remove('animate-spin');
169
+ }, 500);
170
}}
171
>
172
<SyncIcon
0 commit comments