Files
buildpath/frontend/composables/useBuilds.ts
Valentin Haudiquet 271c2b26d8 Multiple changes
- backend: add summoner spells
- backend: add build variants
- backend: builds are now storing full tree with runes (keystones)
- backend: build trees are split on starter items and merged on runes
- frontend: computing core tree now
- frontend: variant selectors
2026-03-06 23:33:02 +01:00

20 lines
392 B
TypeScript

/**
* Composable for managing build data
*/
import { deepClone } from '~/utils/helpers'
export const useBuilds = (buildsProp: Ref<Builds>) => {
const builds = ref<Builds>(deepClone(buildsProp.value))
// Watch for changes and rebuild
watch(
() => buildsProp.value,
newBuilds => {
builds.value = deepClone(newBuilds)
},
{ deep: true }
)
return { builds }
}