1
0
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:
Thomas Heartman 2024-02-05 11:29:58 +09:00
parent 9a8757ba05
commit 1f57b4ea32
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -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 />} />