File tree 1 file changed +5
-8
lines changed
site/src/components/Dashboard 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -31,17 +31,14 @@ export const DashboardProviderContext = createContext<
31
31
> ( undefined ) ;
32
32
33
33
export const DashboardProvider : FC < PropsWithChildren > = ( { children } ) => {
34
- const buildInfoQuery = useBuildInfo ( ) ;
35
- const entitlementsQuery = useEntitlements ( ) ;
34
+ const buildInfo = useBuildInfo ( ) ;
35
+ const entitlements = useEntitlements ( ) ;
36
36
const [ appearanceState , appearanceSend ] = useMachine ( appearanceMachine ) ;
37
37
const [ experimentsState ] = useMachine ( experimentsMachine ) ;
38
38
const { appearance, preview } = appearanceState . context ;
39
39
const { experiments } = experimentsState . context ;
40
40
const isLoading =
41
- ! buildInfoQuery . data ||
42
- ! entitlementsQuery . data ||
43
- ! appearance ||
44
- ! experiments ;
41
+ ! buildInfo . data || ! entitlements . data || ! appearance || ! experiments ;
45
42
46
43
const setAppearancePreview = ( config : AppearanceConfig ) => {
47
44
appearanceSend ( {
@@ -64,8 +61,8 @@ export const DashboardProvider: FC<PropsWithChildren> = ({ children }) => {
64
61
return (
65
62
< DashboardProviderContext . Provider
66
63
value = { {
67
- buildInfo : buildInfoQuery . data ,
68
- entitlements : entitlementsQuery . data ,
64
+ buildInfo : buildInfo . data ,
65
+ entitlements : entitlements . data ,
69
66
experiments,
70
67
appearance : {
71
68
preview,
You can’t perform that action at this time.
0 commit comments