fix(FN-1925): use ReactNode instead of JSX.Element for PluginSlot return type

- Import ReactNode type from react instead of JSX
- Update PluginSlot return type to ReactNode for proper null type inclusion
- This fixes type safety since the function returns null in error cases
This commit is contained in:
Fusion
2026-04-16 11:51:47 -07:00
committed by gsxdsm
parent 4e602d8d90
commit 8705cb08cf

View File

@@ -1,4 +1,4 @@
import type { JSX } from "react";
import type { ReactNode } from "react";
import { ErrorBoundary } from "./ErrorBoundary";
import { usePluginUiSlots } from "../hooks/usePluginUiSlots";
@@ -20,7 +20,7 @@ interface PluginSlotProps {
* Future iterations will replace placeholder divs with dynamically loaded
* components via the plugin's componentPath.
*/
export function PluginSlot({ slotId, projectId }: PluginSlotProps): JSX.Element | null {
export function PluginSlot({ slotId, projectId }: PluginSlotProps): ReactNode {
const { getSlotsForId, loading, error } = usePluginUiSlots(projectId);
// Non-critical failure — no visible UI when loading, errored, or no matching slots