From 10bb7241970688eeb6b5a5e7238f7a9d4389b7c3 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Tue, 3 Jan 2023 10:29:09 -0700 Subject: [PATCH] Fix wrong hook name GitOrigin-RevId: 58f98b508cf650a6ecab38772faf9ecd38c9a7bc --- .../editor-left-menu/context/project-settings-context.tsx | 4 ++-- ...roject-wide-settings.tsx => use-project-wide-settings.tsx} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename services/web/frontend/js/features/editor-left-menu/hooks/{use-set-project-wide-settings.tsx => use-project-wide-settings.tsx} (96%) diff --git a/services/web/frontend/js/features/editor-left-menu/context/project-settings-context.tsx b/services/web/frontend/js/features/editor-left-menu/context/project-settings-context.tsx index 16232a68c1..0dcb72de6a 100644 --- a/services/web/frontend/js/features/editor-left-menu/context/project-settings-context.tsx +++ b/services/web/frontend/js/features/editor-left-menu/context/project-settings-context.tsx @@ -1,6 +1,6 @@ import { createContext, useContext, useMemo } from 'react' import type { PropsWithChildren } from 'react' -import useSetProjectWideSettings from '../hooks/use-set-project-wide-settings' +import useProjectWideSettings from '../hooks/use-project-wide-settings' import useUserWideSettings from '../hooks/use-user-wide-settings' import useProjectWideSettingsSocketListener from '../hooks/use-project-wide-settings-socket-listener' import type { ProjectSettingsScope, UserSettingsScope } from '../utils/api' @@ -48,7 +48,7 @@ export function ProjectSettingsProvider({ setRootDocId, spellCheckLanguage, setSpellCheckLanguage, - } = useSetProjectWideSettings() + } = useProjectWideSettings() const { autoComplete, diff --git a/services/web/frontend/js/features/editor-left-menu/hooks/use-set-project-wide-settings.tsx b/services/web/frontend/js/features/editor-left-menu/hooks/use-project-wide-settings.tsx similarity index 96% rename from services/web/frontend/js/features/editor-left-menu/hooks/use-set-project-wide-settings.tsx rename to services/web/frontend/js/features/editor-left-menu/hooks/use-project-wide-settings.tsx index 0ab103d4b2..3899ac1885 100644 --- a/services/web/frontend/js/features/editor-left-menu/hooks/use-set-project-wide-settings.tsx +++ b/services/web/frontend/js/features/editor-left-menu/hooks/use-project-wide-settings.tsx @@ -6,7 +6,7 @@ import { ProjectSettingsScope, saveProjectSettings } from '../utils/api' import useSetRootDocId from './use-set-root-doc-id' import useSetSpellCheckLanguage from './use-set-spell-check-language' -export default function useSetProjectWideSettings() { +export default function useProjectWideSettings() { // The value will be undefined on mount const [project, setProject] = useScopeValue( 'project',