import React from 'react'; import { observer } from 'mobx-react-lite'; import { EntityPageProps } from './EntityPage'; import { EntityPagePlain } from './EntityPagePlain'; import { FieldValues } from 'react-hook-form'; import { PageErrorState } from '../PageErrorState'; import { useWixPatternsContainer } from '@wix/bex-core/react'; export interface EntityPageWrapperProps extends EntityPageProps {} function _EntityPageWrapper({ state, ...rest }: EntityPageWrapperProps) { const { translate: t } = useWixPatternsContainer(); if (state.initTask.status.isError) { return ( state.retryFetch()} {...rest} /> ); } return ; } export const EntityPageWrapper = observer(_EntityPageWrapper);