mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 17:14:03 +00:00
18 lines
368 B
TypeScript
18 lines
368 B
TypeScript
declare global {
|
|
interface Window {
|
|
__HOUSEHOLD_CONFIG__?: {
|
|
botApiUrl?: string
|
|
}
|
|
}
|
|
}
|
|
|
|
export function runtimeBotApiUrl(): string | undefined {
|
|
if (typeof window === 'undefined') {
|
|
return undefined
|
|
}
|
|
|
|
const configured = window.__HOUSEHOLD_CONFIG__?.botApiUrl?.trim()
|
|
|
|
return configured && configured.length > 0 ? configured : undefined
|
|
}
|