@trackunit/react-core-contexts 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface Props {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const TrackunitDataProviders: ({ children }: Props) => JSX.Element;
6
+ export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- interface IProps {
2
+ interface Props {
3
3
  children: React.ReactNode;
4
4
  }
5
- export declare const TrackunitProviders: ({ children }: IProps) => JSX.Element;
5
+ export declare const TrackunitProviders: ({ children }: Props) => JSX.Element;
6
6
  export {};
package/index.js CHANGED
@@ -5,6 +5,7 @@ import { onError } from '@apollo/client/link/error';
5
5
  import * as Sentry from '@sentry/browser';
6
6
  import { useEnvironment, useToken, EnvironmentContextProvider, TokenProvider, CurrentUserProvider, UserSubscriptionProvider as UserSubscriptionProvider$1 } from '@trackunit/react-core-hooks';
7
7
  import { createUploadLink } from 'apollo-upload-client';
8
+ import { BrowserRouter } from 'react-router-dom';
8
9
  import { EnvironmentRuntime, TokenRuntime, CurrentUserRuntime, UserSubscriptionRuntime } from '@trackunit/iris-app-runtime-core';
9
10
  import * as React from 'react';
10
11
 
@@ -2425,20 +2426,26 @@ const UserSubscriptionProvider = ({
2425
2426
  }));
2426
2427
  };
2427
2428
 
2428
- const TrackunitProviders = ({
2429
+ const TrackunitDataProviders = ({
2429
2430
  children
2430
- }) => {
2431
- return jsx(TileEnvironmentProvider, {
2432
- children: jsx(TileTokenProvider, {
2433
- children: jsx(TileCurrentUserProvider, {
2434
- children: jsx(UserSubscriptionProvider, {
2435
- children: jsx(ManagerApolloProvider, {
2436
- children: children
2437
- })
2431
+ }) => jsx(TileEnvironmentProvider, {
2432
+ children: jsx(TileTokenProvider, {
2433
+ children: jsx(TileCurrentUserProvider, {
2434
+ children: jsx(UserSubscriptionProvider, {
2435
+ children: jsx(ManagerApolloProvider, {
2436
+ children: children
2438
2437
  })
2439
2438
  })
2440
2439
  })
2441
- });
2442
- };
2440
+ })
2441
+ });
2442
+
2443
+ const TrackunitProviders = ({
2444
+ children
2445
+ }) => jsx(TrackunitDataProviders, {
2446
+ children: jsx(BrowserRouter, {
2447
+ children: children
2448
+ })
2449
+ });
2443
2450
 
2444
2451
  export { ManagerApolloProvider, TrackunitProviders };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -12,7 +12,8 @@
12
12
  "react": "17.0.1",
13
13
  "@apollo/client": "3.6.9",
14
14
  "@sentry/browser": "^6.19.4",
15
- "apollo-upload-client": "^14.1.3"
15
+ "apollo-upload-client": "^14.1.3",
16
+ "react-router-dom": "^6.2.2"
16
17
  },
17
18
  "module": "./index.js",
18
19
  "main": "./index.js",