Commit 1513ed4e authored by devjiwonchoi's avatar devjiwonchoi

disable button when isPending

parent 8744efc9
...@@ -242,6 +242,7 @@ export function UserPreferencesBody({ ...@@ -242,6 +242,7 @@ export function UserPreferencesBody({
onClick={() => onClick={() =>
restartServer({ invalidatePersistentCache: false }) restartServer({ invalidatePersistentCache: false })
} }
disabled={isPending}
> >
<span>{isPending ? 'Restarting...' : 'Restart'}</span> <span>{isPending ? 'Restarting...' : 'Restart'}</span>
</button> </button>
...@@ -268,6 +269,7 @@ export function UserPreferencesBody({ ...@@ -268,6 +269,7 @@ export function UserPreferencesBody({
onClick={() => onClick={() =>
restartServer({ invalidatePersistentCache: true }) restartServer({ invalidatePersistentCache: true })
} }
disabled={isPending}
> >
<span>{isPending ? 'Resetting...' : 'Reset Cache'}</span> <span>{isPending ? 'Resetting...' : 'Reset Cache'}</span>
</button> </button>
...@@ -395,6 +397,11 @@ export const DEV_TOOLS_INFO_USER_PREFERENCES_STYLES = css` ...@@ -395,6 +397,11 @@ export const DEV_TOOLS_INFO_USER_PREFERENCES_STYLES = css`
} }
} }
.preference-section button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
:global(.icon) { :global(.icon) {
width: 18px; width: 18px;
height: 18px; height: 18px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment