overleaf/services/web/frontend/js/features/review-panel-new/context/review-panel-providers.tsx
David 438192fc11 Open review panel current file view when clicking add comment tooltip (#20891)
* Remove need for custom set-review-panel-open event

* Open current file view when clicking add comment tooltip

---------

Co-authored-by: Domagoj Kriskovic <dom.kriskovic@overleaf.com>
GitOrigin-RevId: 2b21061193f4270030d73174014aabbd017fd38e
2024-10-14 11:08:56 +00:00

25 lines
866 B
TypeScript

import { FC } from 'react'
import { RangesProvider } from './ranges-context'
import { ChangesUsersProvider } from './changes-users-context'
import { TrackChangesStateProvider } from './track-changes-state-context'
import { ThreadsProvider } from './threads-context'
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
import { ReviewPanelViewProvider } from './review-panel-view-context'
export const ReviewPanelProviders: FC = ({ children }) => {
if (!isSplitTestEnabled('review-panel-redesign')) {
return <>{children}</>
}
return (
<ReviewPanelViewProvider>
<ChangesUsersProvider>
<TrackChangesStateProvider>
<ThreadsProvider>
<RangesProvider>{children}</RangesProvider>
</ThreadsProvider>
</TrackChangesStateProvider>
</ChangesUsersProvider>
</ReviewPanelViewProvider>
)
}