Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

refactor: change name of "Preferences" composable to follow conventions

Smaug6739d16f7360371a
diff --git a/frontend/app/components/MarkdownEditor/modules/editorState.ts b/frontend/app/components/MarkdownEditor/modules/editorState.ts
index fa5be09e..54e1a008 100644
--- a/frontend/app/components/MarkdownEditor/modules/editorState.ts
+++ b/frontend/app/components/MarkdownEditor/modules/editorState.ts
@@ -7,7 +7,7 @@ import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
export interface CreateEditorStateParams {
initialDoc: string;
- preferences: ReturnType<typeof import('~/composables/Preferences').usePreferences>;
+ preferences: ReturnType<typeof import('~/composables/usePreferences').usePreferences>;
themeExtension: Extension;
keymaps: readonly KeyBinding[];
snippetSource: object;
diff --git a/frontend/app/components/MarkdownEditor/modules/editorUtils.ts b/frontend/app/components/MarkdownEditor/modules/editorUtils.ts
index 5c8c9acc..99453b0a 100644
--- a/frontend/app/components/MarkdownEditor/modules/editorUtils.ts
+++ b/frontend/app/components/MarkdownEditor/modules/editorUtils.ts
@@ -43,7 +43,7 @@ function isInsideMath(context: CompletionContext): boolean {
return singleCountBefore % 2 === 1;
}
-export function createSnippetSource(preferences: ReturnType<typeof import('~/composables/Preferences').usePreferences>) {
+export function createSnippetSource(preferences: ReturnType<typeof import('~/composables/usePreferences').usePreferences>) {
return function snippetSource(context: CompletionContext) {
if (!preferences.get('editorSnippetsEnabled').value) return null;
const allSnippets = preferences.get('snippets').value;
diff --git a/frontend/app/composables/Preferences.ts b/frontend/app/composables/usePreferences.ts
similarity index 100%
rename from frontend/app/composables/Preferences.ts
rename to frontend/app/composables/usePreferences.ts