mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
* refactor: port EventHistory to TS/SWR * refactor: fix interface type prefix * refactor: split useEvents and useFeatureEvents hooks Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
24 lines
745 B
TypeScript
24 lines
745 B
TypeScript
import { useParams } from 'react-router';
|
|
import useFeature from '../../../../hooks/api/getters/useFeature/useFeature';
|
|
import { useStyles } from './FeatureLog.styles';
|
|
import { IFeatureViewParams } from '../../../../interfaces/params';
|
|
import { FeatureEventHistory } from '../../../history/FeatureEventHistory/FeatureEventHistory';
|
|
|
|
const FeatureLog = () => {
|
|
const styles = useStyles();
|
|
const { projectId, featureId } = useParams<IFeatureViewParams>();
|
|
const { feature } = useFeature(projectId, featureId);
|
|
|
|
if (!feature.name) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<div className={styles.container}>
|
|
<FeatureEventHistory toggleName={feature.name} />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default FeatureLog;
|