some work on equipment

This commit is contained in:
tresabhi committed 2026-05-15 21:58:30 -05:00
1 parent a40860901b
commit e1cc60ea5e
4 files changed
+40 -1

No files matched your search

@@ -0,0 +1,17 @@
import { api } from "../api/dynamic";
import { useAwait } from "./useAwait";
export function useEquipment(presetId: string, priceId: string) {
const [, presetName] = presetId.split(".");
const [, priceName] = priceId.split(".");
const preset = useAwait(
() => api.equipmentPreset(presetId),
`equipment-preset-${presetName}`,
);
const price = useAwait(
() => api.equipmentPricePreset(priceId),
`equipment-price-${priceName}`,
);
return { preset, price };
}