import { useApi } from '@gear-js/react-hooks'; import { FunctionComponent } from 'react'; function withDeprecatedFallback(component: FunctionComponent, deprecatedComponent: FunctionComponent) { return (props: T & JSX.IntrinsicAttributes) => { const { isV110Runtime } = useApi(); const Component = isV110Runtime ? component : deprecatedComponent; return ; }; } export { withDeprecatedFallback };