2022-03-28 10:49:59 +02:00
|
|
|
import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
|
2021-10-01 13:49:18 +02:00
|
|
|
import { useStyles } from './FeatureLog.styles';
|
2022-03-28 10:49:59 +02:00
|
|
|
import { FeatureEventHistory } from 'component/history/FeatureEventHistory/FeatureEventHistory';
|
2022-05-05 13:42:18 +02:00
|
|
|
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
2021-10-01 13:49:18 +02:00
|
|
|
|
|
|
|
const FeatureLog = () => {
|
2022-05-05 13:42:18 +02:00
|
|
|
const projectId = useRequiredPathParam('projectId');
|
|
|
|
const featureId = useRequiredPathParam('featureId');
|
2022-05-02 15:52:41 +02:00
|
|
|
const { classes: styles } = useStyles();
|
2021-10-01 13:49:18 +02:00
|
|
|
const { feature } = useFeature(projectId, featureId);
|
|
|
|
|
2022-02-04 14:25:56 +01:00
|
|
|
if (!feature.name) {
|
2022-02-18 09:51:10 +01:00
|
|
|
return null;
|
2022-02-04 14:25:56 +01:00
|
|
|
}
|
|
|
|
|
2021-10-01 13:49:18 +02:00
|
|
|
return (
|
|
|
|
<div className={styles.container}>
|
2022-02-04 14:25:56 +01:00
|
|
|
<FeatureEventHistory toggleName={feature.name} />
|
2021-10-01 13:49:18 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default FeatureLog;
|