|
|
|
@ -10,8 +10,14 @@ const RemixUIPanelPlugin = (props: panelPLuginProps, panelRef: any) => { |
|
|
|
|
const localRef = useRef<HTMLDivElement>(null) |
|
|
|
|
const [view, setView] = useState<JSX.Element | HTMLDivElement>() |
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
|
|
const ref:any = panelRef || localRef |
|
|
|
|
if (ref.current) { |
|
|
|
|
if(React.isValidElement(props.pluginRecord.view)) { |
|
|
|
|
console.log('is REACT element', props.pluginRecord.profile.name) |
|
|
|
|
}else{ |
|
|
|
|
console.log('is HTML element', props.pluginRecord.profile.name) |
|
|
|
|
} |
|
|
|
|
if (props.pluginRecord.view) { |
|
|
|
|
if (React.isValidElement(props.pluginRecord.view)) { |
|
|
|
|
setView(props.pluginRecord.view) |
|
|
|
|