1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-01 13:47:27 +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 { ProjectDoraMetrics } from './ProjectDoraMetrics/ProjectDoraMetrics';
import { UiFlags } from 'interfaces/uiConfig'; import { UiFlags } from 'interfaces/uiConfig';
import { HiddenProjectIconWithTooltip } from './HiddenProjectIconWithTooltip/HiddenProjectIconWithTooltip'; import { HiddenProjectIconWithTooltip } from './HiddenProjectIconWithTooltip/HiddenProjectIconWithTooltip';
import { ChangeRequestPlausibleProvider } from 'component/changeRequest/ChangeRequestContext';
const StyledBadge = styled(Badge)(({ theme }) => ({ const StyledBadge = styled(Badge)(({ theme }) => ({
position: 'absolute', position: 'absolute',
@ -76,6 +77,11 @@ export const Project = () => {
const [showDelDialog, setShowDelDialog] = useState(false); const [showDelDialog, setShowDelDialog] = useState(false);
const [
changeRequestChangesWillOverwrite,
setChangeRequestChangesWillOverwrite,
] = useState(false);
const tabs: ITab[] = [ const tabs: ITab[] = [
{ {
title: 'Overview', title: 'Overview',
@ -293,7 +299,18 @@ export const Project = () => {
/> />
<Route <Route
path='change-requests/:id' path='change-requests/:id'
element={<ChangeRequestOverview />} element={
<ChangeRequestPlausibleProvider
value={{
willOverwriteStrategyChanges:
changeRequestChangesWillOverwrite,
registerWillOverwriteStrategyChanges: () =>
setChangeRequestChangesWillOverwrite(true),
}}
>
<ChangeRequestOverview />
</ChangeRequestPlausibleProvider>
}
/> />
<Route path='settings/*' element={<ProjectSettings />} /> <Route path='settings/*' element={<ProjectSettings />} />
<Route path='metrics' element={<ProjectDoraMetrics />} /> <Route path='metrics' element={<ProjectDoraMetrics />} />