Skip to content

Commit

Permalink
undo accidental change
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Loe committed Jul 2, 2024
1 parent 1c8fba4 commit 356ae05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mods/hooks/useDeleteStandaloneModDefinitionAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ import { Events } from "@/telemetry/events";
function useDeleteStandaloneModDefinitionAction(
modViewItem: ModViewItem,
): (() => void) | null {
const { mod, status } = modViewItem;
const { mod, sharing, status } = modViewItem;
const modals = useModals();
const [deleteStandaloneModDefinition] =
useDeleteStandaloneModDefinitionMutation();
const isActive = status === "Active" || status === "Paused";

const canDelete =
isStandaloneModComponent(mod) &&
sharing.source.type === "Personal" &&
// If the status is active, there is still likely a copy of the mod component saved on our server.
// However, we want the user to have to deactivate the mod before deleting it from the server
!isActive;
Expand Down

0 comments on commit 356ae05

Please sign in to comment.