Make store terser
This commit is contained in:
parent
9f712eda71
commit
ab3bf05dfe
|
@ -2,12 +2,7 @@ import { derived, Readable } from "svelte/store"
|
|||
import { auth } from "@/stores/portal"
|
||||
import { FeatureFlags, FeatureFlagDefaults } from "@budibase/types"
|
||||
|
||||
export const featureFlags: Readable<FeatureFlags> = derived(
|
||||
[auth],
|
||||
([$auth]) => {
|
||||
return {
|
||||
...FeatureFlagDefaults,
|
||||
...($auth?.user?.flags || {}),
|
||||
}
|
||||
}
|
||||
)
|
||||
export const featureFlags: Readable<FeatureFlags> = derived(auth, $auth => ({
|
||||
...FeatureFlagDefaults,
|
||||
...($auth?.user?.flags || {}),
|
||||
}))
|
||||
|
|
Loading…
Reference in New Issue