/ support / ebsSupport / client / support.mjs
support.mjs
 1  ��import { effect, signal } from "uhtml/signal"

 2  import { reactive, html } from "uhtml/reactive"

 3  

 4  import { SupportApp } from "./app.template.mjs"

 5  import { SupportState } from "./state.mjs"

 6  

 7  import * as access from "./access.mjs"

 8  import * as constants from "./constants.mjs"

 9  

10  // "reactive" is synonymous with render,

11  const render = reactive(effect)

12  

13  async function main() {

14    const state = SupportState()

15   

16    await access.GetActivityData(state, "all")

17    await access.GetActiveSamples(state)

18    await access.GetAllLeads(state)

19  

20    const updates = access.ConnectUpdates(state)

21  

22    // https://webreflection.github.io/uhtml/#constraints

23    render(document.body, () => SupportApp(state)) 

24  }

25  

26  window.addEventListener("DOMContentLoaded", async () => { await main() })

27