From 1c3223dd30b8685377ce5eee49da4be0f21b63f4 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Wed, 15 Jul 2026 11:24:55 -0300 Subject: [PATCH] fix(dashboard): type the reorder hook's notifier explicitly (dashboard-typecheck TS2339) ReturnType resolves to unknown under the dashboard-scoped tsconfig gate (#7203), so notify.error tripped TS2339. The hook only needs error(), so declare that minimal surface directly. --- .../providers/[id]/hooks/useReorderByAvailability.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(dashboard)/dashboard/providers/[id]/hooks/useReorderByAvailability.ts b/src/app/(dashboard)/dashboard/providers/[id]/hooks/useReorderByAvailability.ts index 5613421837..9527e4b99c 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/hooks/useReorderByAvailability.ts +++ b/src/app/(dashboard)/dashboard/providers/[id]/hooks/useReorderByAvailability.ts @@ -18,9 +18,11 @@ import { useState } from "react"; import { sortConnectionsByAvailability } from "../components/connectionRowHelpers"; import type { ConnectionRowConnection } from "../components/ConnectionRow"; -import { useNotificationStore } from "@/store/notificationStore"; -type NotifyStore = ReturnType; +/** Minimal surface of the notification store this hook needs. */ +interface ReorderNotifier { + error: (message: string) => void; +} export interface UseReorderByAvailabilityParams { connections: ConnectionRowConnection[]; @@ -30,7 +32,7 @@ export interface UseReorderByAvailabilityParams { | ((prev: ConnectionRowConnection[]) => ConnectionRowConnection[]) ) => void; fetchConnections: () => Promise; - notify: NotifyStore; + notify: ReorderNotifier; t: (key: string, params?: Record) => string; }