diff --git a/src/Screens.tsx b/src/Screens.tsx index 14423e6d..48e02a17 100644 --- a/src/Screens.tsx +++ b/src/Screens.tsx @@ -331,4 +331,4 @@ const Screens: React.FC = ({ localCorrupt }) => { ) } -export default React.memo(Screens, () => true) +export default Screens diff --git a/src/components/Instance/Info.tsx b/src/components/Instance/Info.tsx index 70d91f21..283f6cbb 100644 --- a/src/components/Instance/Info.tsx +++ b/src/components/Instance/Info.tsx @@ -12,55 +12,44 @@ export interface Props { potentialWidth?: number } -const InstanceInfo = React.memo( - ({ style, header, content, potentialWidth }: Props) => { - const { colors } = useTheme() +const InstanceInfo: React.FC = ({ style, header, content, potentialWidth }) => { + const { colors } = useTheme() - return ( - - + + {content ? ( + + ) : ( + - {content ? ( - - ) : ( - - )} - - ) - }, - (prev, next) => prev.content === next.content -) + )} + + ) +} export default InstanceInfo diff --git a/src/components/Timeline/Empty.tsx b/src/components/Timeline/Empty.tsx index c533de87..e948f343 100644 --- a/src/components/Timeline/Empty.tsx +++ b/src/components/Timeline/Empty.tsx @@ -13,74 +13,71 @@ export interface Props { queryKey: QueryKeyTimeline } -const TimelineEmpty = React.memo( - ({ queryKey }: Props) => { - const { status, refetch } = useTimelineQuery({ - ...queryKey[1], - options: { notifyOnChangeProps: ['status'] } - }) +const TimelineEmpty: React.FC = ({ queryKey }) => { + const { status, refetch } = useTimelineQuery({ + ...queryKey[1], + options: { notifyOnChangeProps: ['status'] } + }) - const { colors } = useTheme() - const { t } = useTranslation('componentTimeline') + const { colors } = useTheme() + const { t } = useTranslation('componentTimeline') - const children = () => { - switch (status) { - case 'loading': - return - case 'error': - return ( - <> - - - {t('empty.error.message')} - -