import { For, createSignal, onMount } from 'solid-js' import { useRequest } from '~/signals' import type { Rule, RuleProvider } from '~/types' export default () => { const request = useRequest() const [rules, setRules] = createSignal([]) const [rulesProviders, setRulesProviders] = createSignal([]) onMount(async () => { const { rules } = await request .get('rules') .json<{ rules: Record }>() setRules(Object.values(rules)) const { providers } = await request .get('providers/rules') .json<{ providers: Record }>() setRulesProviders(Object.values(providers)) }) return (

Rules

{(rule) => (
{rule.payload}
{rule.type} :: {rule.proxy}
)}

Rules Providers

{(rulesProvider) => (
{rulesProvider.name}
{rulesProvider.vehicleType} :: {rulesProvider.behavior} ( {rulesProvider.ruleCount})
)}
) }