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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user