@@ -30,13 +30,12 @@ import timezone from 'dayjs/plugin/timezone'
3030import utc from 'dayjs/plugin/utc'
3131import Head from 'next/head'
3232import { NuqsAdapter } from 'nuqs/adapters/next/pages'
33- import { ErrorInfo , PropsWithChildren , useCallback } from 'react'
33+ import { ErrorInfo , useCallback } from 'react'
3434import { ErrorBoundary } from 'react-error-boundary'
3535
3636import {
3737 FeatureFlagProvider ,
3838 getFlags ,
39- LOCAL_STORAGE_KEYS ,
4039 TelemetryTagManager ,
4140 ThemeProvider ,
4241 useThemeSandbox ,
@@ -52,14 +51,13 @@ import { GlobalErrorBoundaryState } from 'components/ui/ErrorBoundary/GlobalErro
5251import { useRootQueryClient } from 'data/query-client'
5352import { customFont , sourceCodePro } from 'fonts'
5453import { useCustomContent } from 'hooks/custom-content/useCustomContent'
55- import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
5654import { AuthProvider } from 'lib/auth'
5755import { API_URL , BASE_PATH , IS_PLATFORM , useDefaultProvider } from 'lib/constants'
5856import { ProfileProvider } from 'lib/profile'
5957import { Telemetry } from 'lib/telemetry'
6058import { AppPropsWithLayout } from 'types'
6159import { SonnerToaster , TooltipProvider } from 'ui'
62- import { CommandProvider } from 'ui-patterns/ CommandMenu'
60+ import { StudioCommandProvider as CommandProvider } from 'components/interfaces/App/ CommandMenu/StudioCommandProvider '
6361
6462dayjs . extend ( customParseFormat )
6563dayjs . extend ( utc )
@@ -80,15 +78,6 @@ loader.config({
8078 } ,
8179} )
8280
83- const CommandProviderWithPreferences = ( { children } : PropsWithChildren ) => {
84- const [ commandMenuHotkeyEnabled ] = useLocalStorageQuery < boolean > (
85- LOCAL_STORAGE_KEYS . HOTKEY_COMMAND_MENU ,
86- true
87- )
88-
89- return < CommandProvider openKey = { commandMenuHotkeyEnabled ? 'k' : '' } > { children } </ CommandProvider >
90- }
91-
9281// [Joshen TODO] Once we settle on the new nav layout - we'll need a lot of clean up in terms of our layout components
9382// a lot of them are unnecessary and introduce way too many cluttered CSS especially with the height styles that make
9483// debugging way too difficult. Ideal scenario is we just have one AppLayout to control the height and scroll areas of
@@ -161,15 +150,15 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
161150 disableTransitionOnChange
162151 >
163152 < AppBannerContextProvider >
164- < CommandProviderWithPreferences >
153+ < CommandProvider >
165154 < FeaturePreviewContextProvider >
166155 { getLayout ( < Component { ...pageProps } /> ) }
167156 < StudioCommandMenu />
168157 < FeaturePreviewModal />
169158 </ FeaturePreviewContextProvider >
170159 < SonnerToaster position = "top-right" />
171160 < MonacoThemeProvider />
172- </ CommandProviderWithPreferences >
161+ </ CommandProvider >
173162 </ AppBannerContextProvider >
174163 </ ThemeProvider >
175164 </ RouteValidationWrapper >
0 commit comments