IO-3092 Imgproxy changes, Split client,
This commit is contained in:
@@ -19,12 +19,14 @@ import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import env from "../../env";
|
||||
import ScreenJobDetail from "../screen-job-detail/screen-job-detail.component";
|
||||
import ScreenJobList from "../screen-job-list/screen-job-list.component";
|
||||
import ScreenMediaBrowser from "../screen-media-browser/screen-media-browser.component";
|
||||
import ScreenSettingsComponent from "../screen-settings/screen-settings.component";
|
||||
import ScreenSignIn from "../screen-sign-in/screen-sign-in.component";
|
||||
import ScreenSplash from "../screen-splash/screen-splash.component";
|
||||
import { SplitFactory } from "@splitsoftware/splitio-react-native";
|
||||
|
||||
const ActiveJobStack = createNativeStackNavigator();
|
||||
const MoreStack = createNativeStackNavigator();
|
||||
@@ -148,6 +150,8 @@ const BottomTabsNavigator = () => (
|
||||
</BottomTabs.Navigator>
|
||||
);
|
||||
|
||||
export var splitClient;
|
||||
|
||||
export function ScreenMainComponent({
|
||||
checkUserSession,
|
||||
currentUser,
|
||||
@@ -157,6 +161,16 @@ export function ScreenMainComponent({
|
||||
checkUserSession();
|
||||
}, [checkUserSession]);
|
||||
|
||||
useEffect(() => {
|
||||
if (bodyshop && bodyshop.imexshopid) {
|
||||
splitClient = SplitFactory({
|
||||
//debug: true,
|
||||
core: { authorizationKey: env.SPLIT_API, key: bodyshop.imexshopid },
|
||||
}).client();
|
||||
splitClient.setAttribute("imexshopid", bodyshop.imexshopid);
|
||||
}
|
||||
}, [bodyshop]);
|
||||
|
||||
return (
|
||||
<NavigationContainer>
|
||||
{currentUser.authorized === null ? (
|
||||
|
||||
Reference in New Issue
Block a user