Live via service config (#8378)
* add config (with temp config) * only allow whitelisted domains in form * move config to generic config * use array-based config * update deps * rm expect-error
This commit is contained in:
@@ -6,6 +6,10 @@ import {useAgent} from '#/state/session'
|
||||
type ServiceConfig = {
|
||||
checkEmailConfirmed: boolean
|
||||
topicsEnabled: boolean
|
||||
liveNow: {
|
||||
did: string
|
||||
domains: string[]
|
||||
}[]
|
||||
}
|
||||
|
||||
export function useServiceConfigQuery() {
|
||||
@@ -21,11 +25,13 @@ export function useServiceConfigQuery() {
|
||||
checkEmailConfirmed: Boolean(data.checkEmailConfirmed),
|
||||
// @ts-expect-error not included in types atm
|
||||
topicsEnabled: Boolean(data.topicsEnabled),
|
||||
liveNow: data.liveNow ?? [],
|
||||
}
|
||||
} catch (e) {
|
||||
return {
|
||||
checkEmailConfirmed: false,
|
||||
topicsEnabled: false,
|
||||
liveNow: [],
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user