mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
6a6f155029
* Fix split-tests loading in React component: use `useSplitTestContext` instead of `getSplitTestVariant` * Replace use of `isSplitTestEnabled` by `useSplitTestContext` * Add SplitTestProvider to roots, and fix tests * Create `useFeatureFlag` hook * Use `useFeatureFlag` where applicable GitOrigin-RevId: 9ff7bb3975d50bc4d07d74d93c482d56dc96f615
22 lines
594 B
TypeScript
22 lines
594 B
TypeScript
import { SubscriptionDashboardProvider } from '../../context/subscription-dashboard-context'
|
|
import useWaitForI18n from '../../../../shared/hooks/use-wait-for-i18n'
|
|
import SubscriptionDashboard from './subscription-dashboard'
|
|
import { SplitTestProvider } from '@/shared/context/split-test-context'
|
|
|
|
function Root() {
|
|
const { isReady } = useWaitForI18n()
|
|
|
|
if (!isReady) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<SplitTestProvider>
|
|
<SubscriptionDashboardProvider>
|
|
<SubscriptionDashboard />
|
|
</SubscriptionDashboardProvider>
|
|
</SplitTestProvider>
|
|
)
|
|
}
|
|
|
|
export default Root
|