1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

feat: disable apply button on loading (#3404)

This commit is contained in:
Mateusz Kwasniewski 2023-03-28 13:13:51 +02:00 committed by GitHub
parent 35348c3e90
commit f09565f38f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ export const ChangeRequestOverview: FC = () => {
projectId,
id
);
const { changeState, addComment } = useChangeRequestApi();
const { changeState, addComment, loading } = useChangeRequestApi();
const { refetch: refetchChangeRequestOpen } =
usePendingChangeRequests(projectId);
const { setToastData, setToastApiError } = useToast();
@ -249,7 +249,10 @@ export const ChangeRequestOverview: FC = () => {
environmentId={
changeRequest.environment
}
disabled={!allowChangeRequestActions}
disabled={
!allowChangeRequestActions ||
loading
}
>
Apply changes
</PermissionButton>