Delete hook barrel files and switch to direct hook imports

This commit is contained in:
2026-04-21 20:02:50 +02:00
parent 1ba82d56e7
commit b6d9c649ca
24 changed files with 35 additions and 48 deletions

View File

@@ -1,6 +1,6 @@
import { describe, it, expect, vi } from "vitest";
import { renderHook, act, waitFor } from "@testing-library/react";
import { useJailBannedIps } from "../useJails";
import { useJailBannedIps } from "../useJailBannedIps";
import * as api from "../../api/jails";
vi.mock("../../api/jails");

View File

@@ -1,7 +1,7 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { renderHook, act } from "@testing-library/react";
import * as jailsApi from "../../api/jails";
import { useJailDetail } from "../useJails";
import { useJailDetail } from "../useJailDetail";
import type { Jail } from "../../types/jail";
// Mock the API module

View File

@@ -1,5 +0,0 @@
export { useBlocklists, type UseBlocklistsReturn } from "./useBlocklists";
export { useSchedule, type UseScheduleReturn } from "./useSchedule";
export { useImportLog, type UseImportLogReturn } from "./useImportLog";
export { useRunImport, type UseRunImportReturn } from "./useRunImport";
export { useBlocklistStatus, type UseBlocklistStatusReturn } from "./useBlocklistStatus";

View File

@@ -1,6 +0,0 @@
export { useJailConfigs, type UseJailConfigsResult } from "./useJailConfigs";
export { useJailConfigDetail, type UseJailConfigDetailResult } from "./useJailConfigDetail";
export { useGlobalConfig, type UseGlobalConfigResult } from "./useGlobalConfig";
export { useServerSettings, type UseServerSettingsResult } from "./useServerSettings";
export { useRegexTester, type UseRegexTesterResult } from "./useRegexTester";
export { useLogPreview, type UseLogPreviewResult } from "./useLogPreview";

View File

@@ -1,5 +0,0 @@
export { useJails, type UseJailsResult } from "./useJailList";
export { useJailDetail, type UseJailDetailResult } from "./useJailDetail";
export { useJailBannedIps, type UseJailBannedIpsResult } from "./useJailBannedIps";
export { useActiveBans, type UseActiveBansResult } from "./useActiveBans";
export { useIpLookup, type UseIpLookupResult } from "./useIpLookup";