fix(PropsWithChildren): pass default generic

This commit is contained in:
moklick
2023-02-13 16:05:15 +01:00
parent 0ad8333834
commit 88d4dda260
2 changed files with 2 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ import { Provider } from '../../contexts/RFStoreContext';
import { createRFStore } from '../../store';
import type { ReactFlowState } from '../../types';
const ReactFlowProvider: FC<PropsWithChildren> = ({ children }) => {
const ReactFlowProvider: FC<PropsWithChildren<unknown>> = ({ children }) => {
const storeRef = useRef<StoreApi<ReactFlowState> | null>(null);
if (!storeRef.current) {

View File

@@ -4,7 +4,7 @@ import type { FC, PropsWithChildren } from 'react';
import StoreContext from '../../contexts/RFStoreContext';
import ReactFlowProvider from '../../components/ReactFlowProvider';
const Wrapper: FC<PropsWithChildren> = ({ children }) => {
const Wrapper: FC<PropsWithChildren<unknown>> = ({ children }) => {
const isWrapped = useContext(StoreContext);
if (isWrapped) {