Skip to content

Commit

Permalink
chore: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Dec 20, 2024
1 parent e9c64c2 commit 54a1d4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/views/FormImport.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as J from "fp-ts/Json";
import { O, type Option, ensureError, pipe } from "@std";
import * as E from "fp-ts/Either";
import * as J from "fp-ts/Json";
import { FormDefinition } from "src/core/formDefinition";
import { InvalidData, MigrationError, migrateToLatest } from "src/core/formDefinitionSchema";
import { Readable, writable } from "svelte/store";
import { FormDefinition } from "src/core/formDefinition";

type State = E.Either<string[], Option<FormDefinition>>;
type UiState = {
Expand Down Expand Up @@ -44,7 +44,7 @@ function matchState<T>(state: State, matchers: Matchers<T>): T {

function noop() {}

export function makeFormInputModel({ createForm }: FormImportDeps): FormImportModel {
export function makeFormImportModel({ createForm }: FormImportDeps): FormImportModel {
const state = writable<State>(E.of(O.none));
const setErrors = (errors: string[]) => state.set(E.left(errors));
const resetState = () => state.set(E.of(O.none));
Expand Down
4 changes: 2 additions & 2 deletions src/views/FormImportView.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { App, Modal } from "obsidian";
import { FormImportDeps, makeFormImportModel } from "./FormImport";
import FormImport from "./FormImport.svelte";
import { FormImportDeps, makeFormInputModel } from "./FormImport";
/**
* This class is just the minimum glue code to bind our core logic
* with the svelte UI and obsidian API modal.
Expand All @@ -23,7 +23,7 @@ export class FormImportModal extends Modal {
const { contentEl } = this;
this._component = new FormImport({
target: contentEl,
props: { model: makeFormInputModel(this.deps) },
props: { model: makeFormImportModel(this.deps) },
});
}
}

0 comments on commit 54a1d4b

Please sign in to comment.