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:
parent
e5ff80a9d5
commit
1e47975dc8
@ -17,6 +17,7 @@ import { useStyles } from './styles';
|
|||||||
import { getTogglePath } from '../../../../utils/route-path-helpers';
|
import { getTogglePath } from '../../../../utils/route-path-helpers';
|
||||||
import FeatureStatus from '../../FeatureView2/FeatureStatus/FeatureStatus';
|
import FeatureStatus from '../../FeatureView2/FeatureStatus/FeatureStatus';
|
||||||
import FeatureType from '../../FeatureView2/FeatureType/FeatureType';
|
import FeatureType from '../../FeatureView2/FeatureType/FeatureType';
|
||||||
|
import useProjects from '../../../../hooks/api/getters/useProjects/useProjects';
|
||||||
|
|
||||||
const FeatureToggleListItem = ({
|
const FeatureToggleListItem = ({
|
||||||
feature,
|
feature,
|
||||||
@ -31,11 +32,13 @@ const FeatureToggleListItem = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const styles = useStyles();
|
const styles = useStyles();
|
||||||
|
|
||||||
|
// const {projects} = useProjects()
|
||||||
const isArchive = !!revive;
|
const isArchive = !!revive;
|
||||||
|
|
||||||
const { name, description, type, stale, createdAt, project, lastSeenAt } =
|
const { name, description, type, stale, createdAt, project, lastSeenAt } =
|
||||||
feature;
|
feature;
|
||||||
|
|
||||||
|
// let obj = projects.find(project => project.id === 'projectId');
|
||||||
return (
|
return (
|
||||||
<ListItem
|
<ListItem
|
||||||
{...rest}
|
{...rest}
|
||||||
@ -126,7 +129,7 @@ const FeatureToggleListItem = ({
|
|||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={hasAccess(UPDATE_FEATURE, project)}
|
condition={hasAccess(UPDATE_FEATURE, project)}
|
||||||
show={
|
show={
|
||||||
<IconButton onClick={() => revive(feature.name)}>
|
<IconButton onClick={() => console.log('ho')}>
|
||||||
<Undo />
|
<Undo />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user