Skip to content

Self-hosted house planner: true-scale 2D floor plan, 3D, satellite map overlay, sewer, electrical, water and underfloor heating with calculations, priced bill of materials. React + PHP, no database. By the team behind homedesignsai.pro

559 B
Raw Blame
import { create } from 'zustand'

type HeatingUiState = {
  selected: string | null
  collectorSelected: boolean
  tab: boolean
  select: (id: string | null) => void
  selectCollector: (on: boolean) => void
  setTab: (on: boolean) => void
}

export const useHeatingUi = create<HeatingUiState>()((set) => ({
  selected: null,
  collectorSelected: false,
  tab: false,
  select: (selected) => set({ selected, collectorSelected: false }),
  selectCollector: (collectorSelected) => set({ collectorSelected, selected: null }),
  setTab: (tab) => set({ tab }),
}))