Skip to content

Commit

Permalink
feat: removing renderCard from Tags/index.tsc to remove cardview from…
Browse files Browse the repository at this point in the history
… Tags ListView (#25105)
  • Loading branch information
fisjac authored Aug 30, 2023
1 parent 067bfbf commit 66e2807
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions superset-frontend/src/pages/Tags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import React, { useMemo, useCallback, useState } from 'react';
import React, { useMemo, useState } from 'react';
import { isFeatureEnabled, FeatureFlag, t } from '@superset-ui/core';
import {
createFetchRelated,
Expand All @@ -40,7 +40,6 @@ import { Link } from 'react-router-dom';
import { deleteTags } from 'src/features/tags/tags';
import { Tag as AntdTag } from 'antd';
import { Tag } from 'src/views/CRUD/types';
import TagCard from 'src/features/tags/TagCard';
import TagModal from 'src/features/tags/TagModal';
import FaveStar from 'src/components/FaveStar';

Expand Down Expand Up @@ -297,36 +296,6 @@ function TagList(props: TagListProps) {
},
];

const renderCard = useCallback(
(tag: Tag) => (
<TagCard
tag={tag}
hasPerm={hasPerm}
bulkSelectEnabled={bulkSelectEnabled}
refreshData={refreshData}
showThumbnails={
userKey
? userKey.thumbnails
: isFeatureEnabled(FeatureFlag.THUMBNAILS)
}
userId={userId}
loading={loading}
addDangerToast={addDangerToast}
addSuccessToast={addSuccessToast}
/>
),
[
addDangerToast,
addSuccessToast,
bulkSelectEnabled,
hasPerm,
loading,
userId,
refreshData,
userKey,
],
);

const subMenuButtons: SubMenuProps['buttons'] = [];

if (canDelete) {
Expand Down Expand Up @@ -400,7 +369,6 @@ function TagList(props: TagListProps) {
? userKey.thumbnails
: isFeatureEnabled(FeatureFlag.THUMBNAILS)
}
renderCard={renderCard}
defaultViewMode={
isFeatureEnabled(FeatureFlag.LISTVIEWS_DEFAULT_CARD_VIEW)
? 'card'
Expand Down

0 comments on commit 66e2807

Please sign in to comment.