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