Fix run deletion crash and transfer modal initialization error
Run deletion now properly cleans up boss_results, genlocke_transfers, and genlocke_leg references before deleting the run. Also fix showTransferModal being referenced before initialization in RunEncounters by moving its useState declaration above useLegSurvivors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -396,6 +396,7 @@ export function RunEncounters() {
|
||||
const runIdNum = Number(runId)
|
||||
const { data: run, isLoading, error } = useRun(runIdNum)
|
||||
const advanceLeg = useAdvanceLeg()
|
||||
const [showTransferModal, setShowTransferModal] = useState(false)
|
||||
const { data: survivors } = useLegSurvivors(
|
||||
run?.genlocke?.genlockeId ?? 0,
|
||||
run?.genlocke?.legOrder ?? 0,
|
||||
@@ -423,7 +424,6 @@ export function RunEncounters() {
|
||||
const [showHofModal, setShowHofModal] = useState(false)
|
||||
const [showShinyModal, setShowShinyModal] = useState(false)
|
||||
const [showEggModal, setShowEggModal] = useState(false)
|
||||
const [showTransferModal, setShowTransferModal] = useState(false)
|
||||
const [expandedBosses, setExpandedBosses] = useState<Set<number>>(new Set())
|
||||
const [showTeam, setShowTeam] = useState(true)
|
||||
const [filter, setFilter] = useState<'all' | RouteStatus>('all')
|
||||
|
||||
Reference in New Issue
Block a user