updated ui/client components, refactored deps

This commit is contained in:
dswbx
2025-01-18 15:25:12 +01:00
parent 664aed35f9
commit a20b6b64a9
7 changed files with 19 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
import { Api, type ApiOptions, type TApiUser } from "Api";
import { createContext, useContext, useEffect, useState } from "react";
import { createContext, useContext } from "react";
const ClientContext = createContext<{ baseUrl: string; api: Api }>({
baseUrl: undefined

View File

@@ -1,6 +1,7 @@
import type { DB, PrimaryFieldType } from "core";
import { encodeSearch, objectTransform } from "core/utils";
import type { EntityData, RepoQuery, RepoQueryIn } from "data";
import { objectTransform } from "core/utils/objects";
import { encodeSearch } from "core/utils/reqres";
import type { EntityData, RepoQueryIn } from "data";
import type { ModuleApi, ResponseObject } from "modules/ModuleApi";
import useSWR, { type SWRConfiguration, mutate } from "swr";
import { type Api, useApi } from "ui/client";

View File

@@ -1,7 +1,6 @@
import { Api, type AuthState } from "Api";
import type { AuthState } from "Api";
import type { AuthResponse } from "auth";
import type { AppAuthSchema } from "auth/auth-schema";
import { useEffect, useState } from "react";
import { useState } from "react";
import { useApi, useInvalidate } from "ui/client";
type LoginData = {