mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-27 13:49:10 +02:00
chore: wrap change request overview in plausible context
This commit is contained in:
parent
9a8757ba05
commit
1f57b4ea32
@ -41,6 +41,7 @@ import { Badge } from 'component/common/Badge/Badge';
|
||||
import { ProjectDoraMetrics } from './ProjectDoraMetrics/ProjectDoraMetrics';
|
||||
import { UiFlags } from 'interfaces/uiConfig';
|
||||
import { HiddenProjectIconWithTooltip } from './HiddenProjectIconWithTooltip/HiddenProjectIconWithTooltip';
|
||||
import { ChangeRequestPlausibleProvider } from 'component/changeRequest/ChangeRequestContext';
|
||||
|
||||
const StyledBadge = styled(Badge)(({ theme }) => ({
|
||||
position: 'absolute',
|
||||
@ -76,6 +77,11 @@ export const Project = () => {
|
||||
|
||||
const [showDelDialog, setShowDelDialog] = useState(false);
|
||||
|
||||
const [
|
||||
changeRequestChangesWillOverwrite,
|
||||
setChangeRequestChangesWillOverwrite,
|
||||
] = useState(false);
|
||||
|
||||
const tabs: ITab[] = [
|
||||
{
|
||||
title: 'Overview',
|
||||
@ -293,7 +299,18 @@ export const Project = () => {
|
||||
/>
|
||||
<Route
|
||||
path='change-requests/:id'
|
||||
element={<ChangeRequestOverview />}
|
||||
element={
|
||||
<ChangeRequestPlausibleProvider
|
||||
value={{
|
||||
willOverwriteStrategyChanges:
|
||||
changeRequestChangesWillOverwrite,
|
||||
registerWillOverwriteStrategyChanges: () =>
|
||||
setChangeRequestChangesWillOverwrite(true),
|
||||
}}
|
||||
>
|
||||
<ChangeRequestOverview />
|
||||
</ChangeRequestPlausibleProvider>
|
||||
}
|
||||
/>
|
||||
<Route path='settings/*' element={<ProjectSettings />} />
|
||||
<Route path='metrics' element={<ProjectDoraMetrics />} />
|
||||
|
Loading…
Reference in New Issue
Block a user