mirror of
https://github.com/BillyOutlast/posthog.com.git
synced 2026-02-04 03:11:21 +01:00
* remove nested info from HubSpot request * introduce feature flags to constants file * set experiment variant on mount * routing and flag logic for email flow * old flow (skipDeploymentOptions) * try routing everything through signup page * add a call to reload feature flags; show that it still does not work * logic to set, persist, and update active experiment variants * changes and hydration from feature flags * selector for activeVariant, minor cleanup * bugfix * capture with set_once * send variant name as an event prop, use a more description user prop name * render nothing on the intermediate page if a redirect should occur Co-authored-by: kunal <kunal@kunals-MacBook-Pro.local>
15 lines
541 B
JavaScript
15 lines
541 B
JavaScript
import React from 'react'
|
|
import { Provider } from 'react-redux'
|
|
import { getContext, resetContext } from 'kea'
|
|
import { loadersPlugin } from 'kea-loaders'
|
|
import { routerPlugin } from 'kea-router'
|
|
import { localStoragePlugin } from 'kea-localstorage'
|
|
|
|
export function initKea(isServer = false, location = '') {
|
|
resetContext({
|
|
plugins: [loadersPlugin, routerPlugin(isServer ? { location } : {}), localStoragePlugin],
|
|
})
|
|
}
|
|
|
|
export const wrapElement = ({ element }) => <Provider store={getContext().store}>{element}</Provider>
|