mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-02 14:18:40 +00:00
fix typescript errors (#22465)
This commit is contained in:
parent
680537cd70
commit
9df2c6b8de
@ -163,7 +163,7 @@ const MyFeedWidgetInternal = ({
|
||||
EntityTabs.ACTIVITY_FEED
|
||||
)}
|
||||
moreButtonText={t('label.view-more-count', {
|
||||
count: entityThread.length > 0 ? entityThread.length : '',
|
||||
count: String(entityThread.length > 0 ? entityThread.length : ''),
|
||||
})}
|
||||
showMoreButton={Boolean(!loading) && !isEmpty(entityThread)}
|
||||
/>
|
||||
|
@ -19,11 +19,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { ReactComponent as MyDataIcon } from '../../../assets/svg/ic-my-data.svg';
|
||||
import { ReactComponent as NoDataAssetsPlaceholder } from '../../../assets/svg/no-data-placeholder.svg';
|
||||
import {
|
||||
INITIAL_PAGING_VALUE,
|
||||
PAGE_SIZE,
|
||||
ROUTES,
|
||||
} from '../../../constants/constants';
|
||||
import { INITIAL_PAGING_VALUE, PAGE_SIZE } from '../../../constants/constants';
|
||||
import {
|
||||
applySortToData,
|
||||
getSortField,
|
||||
@ -186,7 +182,7 @@ const MyDataWidgetInternal = ({
|
||||
const emptyState = useMemo(
|
||||
() => (
|
||||
<WidgetEmptyState
|
||||
actionButtonLink={ROUTES.MY_DATA}
|
||||
actionButtonLink={`users/${currentUser?.name}/mydata`}
|
||||
actionButtonText={t('label.get-started')}
|
||||
description={`${t('message.nothing-saved-yet')} ${t(
|
||||
'message.no-owned-data'
|
||||
@ -288,7 +284,7 @@ const MyDataWidgetInternal = ({
|
||||
EntityTabs.ACTIVITY_FEED
|
||||
)}
|
||||
moreButtonText={t('label.view-more-count', {
|
||||
count: data.length > 0 ? data.length : '',
|
||||
count: String(data.length > 0 ? data.length : ''),
|
||||
})} // if data is empty then show view more
|
||||
showMoreButton={Boolean(!isLoading) && !isEmpty(data)}
|
||||
/>
|
||||
|
@ -271,7 +271,7 @@ function FollowingWidget({
|
||||
EntityTabs.ACTIVITY_FEED
|
||||
)}
|
||||
moreButtonText={t('label.view-more-count', {
|
||||
count: followedData.length > 0 ? followedData.length : '',
|
||||
count: String(followedData.length > 0 ? followedData.length : ''),
|
||||
})}
|
||||
showMoreButton={
|
||||
Boolean(!isLoadingOwnedData) && !isEmpty(followedData)
|
||||
|
@ -14,7 +14,6 @@
|
||||
import { isEmpty, orderBy, toLower } from 'lodash';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { ReactComponent as MyTaskNoDataIcon } from '../../../../assets/svg/add-placeholder.svg';
|
||||
import { ReactComponent as MyTaskIcon } from '../../../../assets/svg/ic-my-task.svg';
|
||||
import { SIZE, SORT_ORDER } from '../../../../enums/common.enum';
|
||||
@ -46,7 +45,6 @@ const MyTaskWidget = ({
|
||||
currentLayout,
|
||||
}: WidgetCommonProps) => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const { currentUser } = useApplicationStore();
|
||||
const [sortedData, setSortedData] = useState<Thread[]>([]);
|
||||
const [selectedSortBy, setSelectedSortBy] = useState<string>(
|
||||
@ -139,7 +137,7 @@ const MyTaskWidget = ({
|
||||
<div className="widget-content flex-1">
|
||||
{isEmpty(sortedData) ? (
|
||||
<WidgetEmptyState
|
||||
showActionButton
|
||||
actionButtonLink={`users/${currentUser?.name}/task`}
|
||||
actionButtonText={t('label.view-all-task-plural')}
|
||||
dataTestId="my-task-empty-state"
|
||||
description={t('message.my-task-no-data-placeholder')}
|
||||
@ -151,7 +149,6 @@ const MyTaskWidget = ({
|
||||
/>
|
||||
}
|
||||
title={t('label.no-tasks-yet')}
|
||||
onActionClick={() => navigate(`users/${currentUser?.name}/task`)}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user