feat(app): improve desktop multi-server support (#30678)
Co-authored-by: Brendan Allan <git@brendonovich.dev>
This commit is contained in:
co-authored by
Brendan Allan
parent
7ae856a9e9
commit
7f33576f46
@@ -1,10 +1,11 @@
|
||||
import { createContext, createMemo, Show, useContext, type ParentProps, type Accessor } from "solid-js"
|
||||
|
||||
export function createSimpleContext<T, Props extends Record<string, any>>(input: {
|
||||
name: string
|
||||
init: ((input: Props) => T) | (() => T)
|
||||
gate?: boolean
|
||||
}) {
|
||||
export function createSimpleContext<T, Props extends Record<string, any>>(
|
||||
input: {
|
||||
name: string
|
||||
init: ((input: Props) => T) | (() => T)
|
||||
} & (T extends { ready: unknown } ? { gate: boolean } : { gate?: boolean }),
|
||||
) {
|
||||
const ctx = createContext<T>()
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user