taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 9ab9b012f52c198a7dba69ce636b10f4311834f0
parent 3fdbe1441366b470f0ba7d4ba25227fb06d2de8e
Author: Florian Dold <florian@dold.me>
Date:   Tue, 27 Aug 2024 15:35:33 +0200

-dce

Diffstat:
Mpackages/auditor-backoffice-ui/src/ApplicationReadyRoutes.tsx | 11-----------
Mpackages/auditor-backoffice-ui/src/components/forms/FormProvider.tsx | 16+---------------
2 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/packages/auditor-backoffice-ui/src/ApplicationReadyRoutes.tsx b/packages/auditor-backoffice-ui/src/ApplicationReadyRoutes.tsx @@ -19,7 +19,6 @@ * @author Sebastian Javier Marchano (sebasjm) * @author Nic Eigel */ -import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { createHashHistory } from "history"; import { Fragment, VNode, h } from "preact"; import { Route, Router } from "preact-router"; @@ -27,10 +26,6 @@ import { useState } from "preact/hooks"; import { InstanceRoutes } from "./InstanceRoutes.js"; import { Loading } from "./components/exception/loading.js"; import { NotYetReadyAppMenu } from "./components/menu/index.js"; -import { - useBackendContext, - useBackendTokenContext, -} from "./context/backend.js"; import { useBackendToken } from "./hooks/backend.js"; import { LoginPage } from "./paths/login/index.js"; import { Settings } from "./paths/settings/index.js"; @@ -40,12 +35,6 @@ import { Settings } from "./paths/settings/index.js"; * @returns */ export function ApplicationReadyRoutes(): VNode { - const { i18n } = useTranslationContext(); - const [unauthorized, setUnauthorized] = useState(false); - const [backendToken, setToken] = useState(false); - const { url: backendURL } = useBackendContext(); - const { token } = useBackendTokenContext(); - //TODO FIX bearer const result = useBackendToken(); if (result.loading) return <Loading />; diff --git a/packages/auditor-backoffice-ui/src/components/forms/FormProvider.tsx b/packages/auditor-backoffice-ui/src/components/forms/FormProvider.tsx @@ -20,7 +20,7 @@ */ import { ComponentChildren, createContext, h, VNode } from "preact"; -import { useContext, useMemo } from "preact/hooks"; +import { useMemo } from "preact/hooks"; type Updater<S> = (value: (prevState: S) => S) => void; @@ -82,16 +82,6 @@ export interface FormType<T> { const FormContext = createContext<FormType<unknown>>(null!); -/** - * FIXME: - * USE MEMORY EVENTS INSTEAD OF CONTEXT - * @deprecated - */ - -export function useFormContext<T>() { - return useContext<FormType<T>>(FormContext); -} - export type FormErrors<T> = { [P in keyof T]?: string | FormErrors<T[P]>; }; @@ -103,7 +93,3 @@ export type FormtoStr<T> = { export type FormfromStr<T> = { [P in keyof T]?: (f: string) => T[P]; }; - -export type FormUpdater<T> = { - [P in keyof T]?: (f: keyof T) => (v: T[P]) => void; -};