1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/feature/FeatureView/FeatureLog/FeatureLog.tsx
Ivar Conradi Østhus 07e8a351bb
Fix/show tag events (#3064)
This PR fixes two issues with events today:

1. Feature toggles "Event log" must include all events, regardless of
the project. This is important as feature toggles may move between
2. Add/remove tags on a feature toggle events should include project id
in order to show up in the project specific event log.
2023-02-08 19:57:21 +01:00

29 lines
859 B
TypeScript

import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
import { EventLog } from 'component/events/EventLog/EventLog';
import { styled } from '@mui/material';
const StyledContainer = styled('div')(({ theme }) => ({
borderRadius: theme.spacing(1.5),
backgroundColor: theme.palette.background.paper,
padding: theme.spacing(4),
}));
const FeatureLog = () => {
const projectId = useRequiredPathParam('projectId');
const featureId = useRequiredPathParam('featureId');
const { feature } = useFeature(projectId, featureId);
if (!feature.name) {
return null;
}
return (
<StyledContainer>
<EventLog title="Event log" feature={featureId} displayInline />
</StyledContainer>
);
};
export default FeatureLog;