1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

use useProjects to check if project deleted or not

This commit is contained in:
Youssef 2021-11-05 10:14:52 +01:00
parent e5ff80a9d5
commit 1e47975dc8

View File

@ -17,6 +17,7 @@ import { useStyles } from './styles';
import { getTogglePath } from '../../../../utils/route-path-helpers';
import FeatureStatus from '../../FeatureView2/FeatureStatus/FeatureStatus';
import FeatureType from '../../FeatureView2/FeatureType/FeatureType';
import useProjects from '../../../../hooks/api/getters/useProjects/useProjects';
const FeatureToggleListItem = ({
feature,
@ -31,11 +32,13 @@ const FeatureToggleListItem = ({
}) => {
const styles = useStyles();
// const {projects} = useProjects()
const isArchive = !!revive;
const { name, description, type, stale, createdAt, project, lastSeenAt } =
feature;
// let obj = projects.find(project => project.id === 'projectId');
return (
<ListItem
{...rest}
@ -126,7 +129,7 @@ const FeatureToggleListItem = ({
<ConditionallyRender
condition={hasAccess(UPDATE_FEATURE, project)}
show={
<IconButton onClick={() => revive(feature.name)}>
<IconButton onClick={() => console.log('ho')}>
<Undo />
</IconButton>
}