mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
d8143c6ff4
* refactor: fix child selector warnings * refactor: update react-router-dom * refactor: use BrowserRouter as in react-router docs * refactor: replace Redirect with Navigate * refactor: replace Switch with Routes * refactor: replace useHistory with useNavigate * refactor: replace useParams types with useRequiredPathParam * refactor: replace NavLink activeStyle with callback * refactor: fix matchPath arg order * refactor: Remove unused link state * refactor: delete broken snapshot test * refactor: render 404 page without redirect * refactor: normalize path parameter names * refactor: fix Route component usage
24 lines
753 B
TypeScript
24 lines
753 B
TypeScript
import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
|
|
import { useStyles } from './FeatureLog.styles';
|
|
import { FeatureEventHistory } from 'component/history/FeatureEventHistory/FeatureEventHistory';
|
|
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
|
|
|
const FeatureLog = () => {
|
|
const projectId = useRequiredPathParam('projectId');
|
|
const featureId = useRequiredPathParam('featureId');
|
|
const { classes: styles } = useStyles();
|
|
const { feature } = useFeature(projectId, featureId);
|
|
|
|
if (!feature.name) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className={styles.container}>
|
|
<FeatureEventHistory toggleName={feature.name} />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default FeatureLog;
|