Make buttons hide again when performed_at is not null
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 1m7s
Test, Build, Deploy / Create Sentry Release (push) Successful in 7s

This commit is contained in:
2026-04-16 03:52:40 -04:00
parent 171240bc7d
commit 2e76bd9f28

View File

@@ -271,7 +271,7 @@ export default function () {
// Technically this won't be the same as the time in the db, but that doesn't matter since this is just to hide the button // Technically this won't be the same as the time in the db, but that doesn't matter since this is just to hide the button
newEventData[eventData.findIndex((e) => e.id === eventId)].performed_at = newEventData[eventData.findIndex((e) => e.id === eventId)].performed_at =
Date.now(); new Date().toISOString();
setEventData([...newEventData]); setEventData([...newEventData]);
setSelectedEvent(""); setSelectedEvent("");
@@ -313,7 +313,8 @@ export default function () {
const newEventData = eventData; const newEventData = eventData;
newEventData[eventData.findIndex((e) => e.id === eventId)].performed_at = 0; newEventData[eventData.findIndex((e) => e.id === eventId)].performed_at =
new Date(0).toISOString();
setEventData([...newEventData]); setEventData([...newEventData]);
setSelectedEvent(""); setSelectedEvent("");
setDisableClicks(false); setDisableClicks(false);
@@ -664,9 +665,7 @@ export default function () {
</Button> </Button>
</> </>
) : null} ) : null}
{can_approve && {can_approve && !event.pending && !event.performed_at ? (
!event.pending &&
typeof event.performed_at !== "number" ? (
<> <>
<Button <Button
colorScheme="blue" colorScheme="blue"