mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
start of equipment ui
This commit is contained in:
1 parent
c45af8e156
commit
30fa18f0fd
12 files changed
+90
-19
No files matched your search
@@ -1,13 +1,10 @@
|
||||
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(presetName),
|
||||
// `equipment-preset-${presetName}`,
|
||||
// );
|
||||
// const price = useAwait(
|
||||
// () => api.equipmentPrice(priceName),
|
||||
// `equipment-price-${priceName}`,
|
||||
// );
|
||||
// return { preset, price };
|
||||
const equipment = useAwait(() => api.equipment(), "equipment");
|
||||
const preset = equipment.presets[presetId];
|
||||
const price = equipment.prices[priceId];
|
||||
|
||||
return { preset, price, equipment };
|
||||
}
|
||||
Reference in new issue
Block a user