@trackunit/react-core-contexts 1.3.195 → 1.3.197

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.
package/index.cjs.js CHANGED
@@ -9,31 +9,12 @@ var utilities = require('@apollo/client/utilities');
9
9
  var reactCoreHooks = require('@trackunit/react-core-hooks');
10
10
  var graphql = require('graphql');
11
11
  var graphqlSse = require('graphql-sse');
12
- var React = require('react');
12
+ var react = require('react');
13
13
  require('@js-temporal/polyfill');
14
14
  var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
15
15
  var reactComponents = require('@trackunit/react-components');
16
16
  var irisAppRuntimeCore = require('@trackunit/iris-app-runtime-core');
17
17
 
18
- function _interopNamespaceDefault(e) {
19
- var n = Object.create(null);
20
- if (e) {
21
- Object.keys(e).forEach(function (k) {
22
- if (k !== 'default') {
23
- var d = Object.getOwnPropertyDescriptor(e, k);
24
- Object.defineProperty(n, k, d.get ? d : {
25
- enumerable: true,
26
- get: function () { return e[k]; }
27
- });
28
- }
29
- });
30
- }
31
- n.default = e;
32
- return Object.freeze(n);
33
- }
34
-
35
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
36
-
37
18
  const generateHeaders = (token, tracingHeaders) => {
38
19
  const headers = {
39
20
  ...Object.entries(tracingHeaders).reduce((acc, [key, value]) => {
@@ -220,7 +201,7 @@ const useApolloClient = () => {
220
201
  const { graphqlPublicUrl, graphqlInternalUrl, graphqlReportUrl, environment, tracingHeaders } = reactCoreHooks.useEnvironment();
221
202
  const { token: currentToken } = reactCoreHooks.useToken();
222
203
  const errorHandler = reactCoreHooks.useErrorHandler();
223
- const [client] = React.useState(() => {
204
+ const [client] = react.useState(() => {
224
205
  return createApolloClient({
225
206
  /* DON'T CHANGE THIS ! its there to ensure we don't recreate apollo client just because the token changes,
226
207
  the token will then be set on the instance without react reporting a new client
@@ -234,7 +215,7 @@ const useApolloClient = () => {
234
215
  errorHandler,
235
216
  });
236
217
  });
237
- React.useMemo(() => {
218
+ react.useMemo(() => {
238
219
  if (client.getToken() !== currentToken) {
239
220
  client.setToken(currentToken);
240
221
  }
@@ -258,7 +239,7 @@ const ManagerApolloProvider = ({ children }) => {
258
239
  * This is a provider for the AnalyticsProvider.
259
240
  */
260
241
  const AnalyticsProviderIrisApp = ({ children }) => {
261
- const contextValue = React.useMemo(() => ({
242
+ const contextValue = react.useMemo(() => ({
262
243
  logPageView: details => {
263
244
  irisAppRuntimeCore.AnalyticsContextRuntime.logPageView(details);
264
245
  },
@@ -281,7 +262,7 @@ const AnalyticsProviderIrisApp = ({ children }) => {
281
262
  * @param methods STABLE object with the methods you'd want to subscribe to. Wrap in useMemo for instance to make it stable
282
263
  */
283
264
  const useSubscribeToHostChanges = (methods) => {
284
- React.useEffect(() => {
265
+ react.useEffect(() => {
285
266
  const connection = irisAppRuntimeCore.setupHostConnector(methods);
286
267
  return () => {
287
268
  connection.destroy();
@@ -293,17 +274,17 @@ const useSubscribeToHostChanges = (methods) => {
293
274
  * This is a provider for the AssetSortingContext.
294
275
  */
295
276
  const AssetSortingProviderIrisApp = ({ children }) => {
296
- const [assetSortingState, setAssetSortingState] = React.useState(null);
297
- React.useEffect(() => {
277
+ const [assetSortingState, setAssetSortingState] = react.useState(null);
278
+ react.useEffect(() => {
298
279
  irisAppRuntimeCore.AssetSortingRuntime.getAssetSortingState()
299
280
  .catch(() => null)
300
281
  .then(setAssetSortingState);
301
282
  }, []);
302
- const methods = React.useMemo(() => ({
283
+ const methods = react.useMemo(() => ({
303
284
  onAssetSortingStateChanged: setAssetSortingState,
304
285
  }), [setAssetSortingState]);
305
286
  useSubscribeToHostChanges(methods);
306
- const contextValue = React.useMemo(() => ({
287
+ const contextValue = react.useMemo(() => ({
307
288
  sortingState: assetSortingState,
308
289
  setSortBy: irisAppRuntimeCore.AssetSortingRuntime.setAssetSortingState,
309
290
  }), [assetSortingState]);
@@ -317,7 +298,7 @@ const AssetSortingProviderIrisApp = ({ children }) => {
317
298
  * This is a provider for the ConfirmationDialogContext.
318
299
  */
319
300
  const ConfirmationDialogProviderIrisApp = ({ children }) => {
320
- const value = React.useMemo(() => ({ confirm: irisAppRuntimeCore.ConfirmationDialogRuntime.confirm }), []);
301
+ const value = react.useMemo(() => ({ confirm: irisAppRuntimeCore.ConfirmationDialogRuntime.confirm }), []);
321
302
  return jsxRuntime.jsx(reactCoreHooks.ConfirmationDialogProvider, { value: value, children: children });
322
303
  };
323
304
 
@@ -325,8 +306,8 @@ const ConfirmationDialogProviderIrisApp = ({ children }) => {
325
306
  * This is a provider for the EnvironmentContext.
326
307
  */
327
308
  const EnvironmentProviderIrisApp = ({ children }) => {
328
- const [environment, setEnvironment] = React.useState(null);
329
- React.useEffect(() => {
309
+ const [environment, setEnvironment] = react.useState(null);
310
+ react.useEffect(() => {
330
311
  const updateEnv = async () => {
331
312
  try {
332
313
  setEnvironment(await irisAppRuntimeCore.EnvironmentRuntime.getEnvironmentContext());
@@ -349,7 +330,7 @@ const EnvironmentProviderIrisApp = ({ children }) => {
349
330
  * This is a provider for the ErrorHandlingProvider.
350
331
  */
351
332
  const ErrorHandlingProviderIrisApp = ({ children, errorHandler }) => {
352
- const defaultContextValue = React.useMemo(() => ({
333
+ const defaultContextValue = react.useMemo(() => ({
353
334
  captureException: details => {
354
335
  // eslint-disable-next-line no-console
355
336
  console.error(details);
@@ -368,8 +349,8 @@ const ErrorHandlingProviderIrisApp = ({ children, errorHandler }) => {
368
349
  * This is a provider for the FilterBarContext.
369
350
  */
370
351
  const FilterBarProviderIrisApp = ({ children }) => {
371
- const [filterBarContext, setFilterBarContext] = React.useState();
372
- React.useEffect(() => {
352
+ const [filterBarContext, setFilterBarContext] = react.useState();
353
+ react.useEffect(() => {
373
354
  irisAppRuntimeCore.FilterBarRuntime.getFilterBarValues()
374
355
  .catch(() => null)
375
356
  .then(filterBarValues => {
@@ -419,7 +400,7 @@ const FilterBarProviderIrisApp = ({ children }) => {
419
400
  }
420
401
  });
421
402
  }, []);
422
- const methods = React.useMemo(() => ({
403
+ const methods = react.useMemo(() => ({
423
404
  onFilterBarValuesChanged: (filterBarValues) => {
424
405
  setFilterBarContext(prev => ({
425
406
  filterBarValues: filterBarValues || null,
@@ -464,7 +445,7 @@ const FilterBarProviderIrisApp = ({ children }) => {
464
445
  * This is a provider for the Modal Dialog Context.
465
446
  */
466
447
  const ModalDialogContextProviderIrisApp = ({ children }) => {
467
- const value = React__namespace.useMemo(() => ({ openModal: irisAppRuntimeCore.ModalDialogRuntime.openModal, closeModal: irisAppRuntimeCore.ModalDialogRuntime.closeModal }), []);
448
+ const value = react.useMemo(() => ({ openModal: irisAppRuntimeCore.ModalDialogRuntime.openModal, closeModal: irisAppRuntimeCore.ModalDialogRuntime.closeModal }), []);
468
449
  return jsxRuntime.jsx(reactCoreHooks.ModalDialogContextProvider, { value: value, children: children });
469
450
  };
470
451
 
@@ -472,7 +453,7 @@ const ModalDialogContextProviderIrisApp = ({ children }) => {
472
453
  * This is a provider for the NavigationContext.
473
454
  */
474
455
  const NavigationProviderIrisApp = ({ children }) => {
475
- const environment = React__namespace.useMemo(() => {
456
+ const environment = react.useMemo(() => {
476
457
  return irisAppRuntimeCore.NavigationRuntime;
477
458
  }, []);
478
459
  return jsxRuntime.jsx(reactCoreHooks.NavigationContextProvider, { value: environment, children: children });
@@ -482,9 +463,9 @@ const NavigationProviderIrisApp = ({ children }) => {
482
463
  * This is a provider for the OemBrandingContext.
483
464
  */
484
465
  const OemBrandingContextProviderIrisApp = ({ children }) => {
485
- const [oemBrandingContext, setOemBrandingContext] = React.useState(null);
486
- const [ctxError, setCtxError] = React.useState(false);
487
- React.useEffect(() => {
466
+ const [oemBrandingContext, setOemBrandingContext] = react.useState(null);
467
+ const [ctxError, setCtxError] = react.useState(false);
468
+ react.useEffect(() => {
488
469
  irisAppRuntimeCore.OemBrandingContextRuntime.getOemBrandingContextRuntime()
489
470
  .then((ctx) => {
490
471
  if (!ctx) {
@@ -508,7 +489,7 @@ const OemBrandingContextProviderIrisApp = ({ children }) => {
508
489
  * This is a provider for the ToastContext.
509
490
  */
510
491
  const ThemeCssProviderIrisApp = ({ children }) => {
511
- React.useEffect(() => {
492
+ react.useEffect(() => {
512
493
  irisAppRuntimeCore.ThemeCssRuntime.getThemeCssProperties().then(css => {
513
494
  if (css) {
514
495
  Object.entries(css).forEach(([key, value]) => {
@@ -524,8 +505,8 @@ const ThemeCssProviderIrisApp = ({ children }) => {
524
505
  * This is a provider for the FilterBarContext.
525
506
  */
526
507
  const TimeRangeProviderIrisApp = ({ children }) => {
527
- const [timeRangeContext, setTimeRangeContext] = React.useState();
528
- React.useEffect(() => {
508
+ const [timeRangeContext, setTimeRangeContext] = react.useState();
509
+ react.useEffect(() => {
529
510
  irisAppRuntimeCore.TimeRangeRuntime.getTimeRange()
530
511
  .catch(() => null)
531
512
  .then(timeRange => {
@@ -534,7 +515,7 @@ const TimeRangeProviderIrisApp = ({ children }) => {
534
515
  }));
535
516
  });
536
517
  }, []);
537
- const methods = React.useMemo(() => ({
518
+ const methods = react.useMemo(() => ({
538
519
  onTimeRangeChanged: (timeRange) => {
539
520
  setTimeRangeContext(prev => ({
540
521
  timeRange: timeRange || null,
@@ -552,7 +533,7 @@ const TimeRangeProviderIrisApp = ({ children }) => {
552
533
  * This is a provider for the ToastContext.
553
534
  */
554
535
  const ToastProviderIrisApp = ({ children }) => {
555
- const value = React.useMemo(() => ({ addToast: irisAppRuntimeCore.ToastRuntime.addToast }), []);
536
+ const value = react.useMemo(() => ({ addToast: irisAppRuntimeCore.ToastRuntime.addToast }), []);
556
537
  return jsxRuntime.jsx(reactCoreHooks.ToastProvider, { value: value, children: children });
557
538
  };
558
539
 
@@ -560,9 +541,9 @@ const ToastProviderIrisApp = ({ children }) => {
560
541
  * This is a provider for the TokenContext.
561
542
  */
562
543
  const TokenProviderIrisApp = ({ children }) => {
563
- const [tokenContext, setTokenContext] = React.useState(null);
564
- const [ctxError, setCtxError] = React.useState(false);
565
- React.useEffect(() => {
544
+ const [tokenContext, setTokenContext] = react.useState(null);
545
+ const [ctxError, setCtxError] = react.useState(false);
546
+ react.useEffect(() => {
566
547
  irisAppRuntimeCore.TokenRuntime.getTokenContext()
567
548
  .then((ctx) => {
568
549
  if (!ctx) {
@@ -573,7 +554,7 @@ const TokenProviderIrisApp = ({ children }) => {
573
554
  })
574
555
  .catch(() => setCtxError(true));
575
556
  }, []);
576
- const methods = React.useMemo(() => ({
557
+ const methods = react.useMemo(() => ({
577
558
  onTokenChanged: setTokenContext,
578
559
  }), [setTokenContext]);
579
560
  useSubscribeToHostChanges(methods);
@@ -590,9 +571,9 @@ const TokenProviderIrisApp = ({ children }) => {
590
571
  * This is a provider for the CurrentUserContext.
591
572
  */
592
573
  const CurrentUserProviderIrisApp = ({ children }) => {
593
- const [currentuserContext, setCurrentUserContext] = React.useState(null);
594
- const [ctxError, setCtxError] = React.useState(false);
595
- React.useEffect(() => {
574
+ const [currentuserContext, setCurrentUserContext] = react.useState(null);
575
+ const [ctxError, setCtxError] = react.useState(false);
576
+ react.useEffect(() => {
596
577
  irisAppRuntimeCore.CurrentUserRuntime.getCurrentUserContext()
597
578
  .then((ctx) => {
598
579
  if (!ctx) {
@@ -616,11 +597,11 @@ const CurrentUserProviderIrisApp = ({ children }) => {
616
597
  * This is a provider for the CurrentUserContext.
617
598
  */
618
599
  const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
619
- const [language, setLanguage] = React.useState(null);
620
- const [systemOfMeasurement, setSystemOfMeasurement] = React.useState(null);
621
- const [timeZonePreference, setTimeZonePreference] = React.useState(null);
622
- const [ctxError, setCtxError] = React.useState(false);
623
- React.useEffect(() => {
600
+ const [language, setLanguage] = react.useState(null);
601
+ const [systemOfMeasurement, setSystemOfMeasurement] = react.useState(null);
602
+ const [timeZonePreference, setTimeZonePreference] = react.useState(null);
603
+ const [ctxError, setCtxError] = react.useState(false);
604
+ react.useEffect(() => {
624
605
  irisAppRuntimeCore.CurrentUserPreferenceRuntime.getCurrentUserLanguage()
625
606
  .then((lang) => {
626
607
  if (!lang) {
@@ -631,12 +612,12 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
631
612
  })
632
613
  .catch(() => setCtxError(true));
633
614
  }, [setLanguage]);
634
- React.useEffect(() => {
615
+ react.useEffect(() => {
635
616
  irisAppRuntimeCore.CurrentUserPreferenceRuntime.getCurrentUserSystemOfMeasurement()
636
617
  .catch(() => null)
637
618
  .then(setSystemOfMeasurement);
638
619
  }, []);
639
- React.useEffect(() => {
620
+ react.useEffect(() => {
640
621
  irisAppRuntimeCore.CurrentUserPreferenceRuntime.getCurrentUserTimeZonePreference()
641
622
  .catch(() => null)
642
623
  .then(setTimeZonePreference);
@@ -654,8 +635,8 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
654
635
  * This is a provider for the UserSubscriptionContext.
655
636
  */
656
637
  const UserSubscriptionProviderIrisApp = ({ children }) => {
657
- const [subscription, setSubscription] = React__namespace.useState(null);
658
- React__namespace.useEffect(() => {
638
+ const [subscription, setSubscription] = react.useState(null);
639
+ react.useEffect(() => {
659
640
  irisAppRuntimeCore.UserSubscriptionRuntime.getUserSubscriptionContext()
660
641
  .catch(() => null)
661
642
  .then(setSubscription);
@@ -681,7 +662,7 @@ const TrackunitProviders = ({ translations, children, errorHandler }) => {
681
662
  i18nLibraryTranslation.registerTranslations(translations); // Register the apps translations if passed.
682
663
  }
683
664
  i18nLibraryTranslation.initializeTranslationsForApp(); // Initialize all registered translations
684
- return (jsxRuntime.jsx(EnvironmentProviderIrisApp, { children: jsxRuntime.jsx(ErrorHandlingProviderIrisApp, { errorHandler: errorHandler, children: jsxRuntime.jsx(ThemeCssProviderIrisApp, { children: jsxRuntime.jsx(TokenProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserPreferenceProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserProviderIrisApp, { children: jsxRuntime.jsx(UserSubscriptionProviderIrisApp, { children: jsxRuntime.jsx(AnalyticsProviderIrisApp, { children: jsxRuntime.jsx(OemBrandingContextProviderIrisApp, { children: jsxRuntime.jsx(AssetSortingProviderIrisApp, { children: jsxRuntime.jsx(ManagerApolloProvider, { children: jsxRuntime.jsx(NavigationProviderIrisApp, { children: jsxRuntime.jsx(ToastProviderIrisApp, { children: jsxRuntime.jsx(ModalDialogContextProviderIrisApp, { children: jsxRuntime.jsx(ConfirmationDialogProviderIrisApp, { children: jsxRuntime.jsx(FilterBarProviderIrisApp, { children: jsxRuntime.jsx(TimeRangeProviderIrisApp, { children: jsxRuntime.jsx(WidgetConfigProviderIrisApp, { children: jsxRuntime.jsx(React.Suspense, { fallback: jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", dataTestId: "trackunit-providers" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
665
+ return (jsxRuntime.jsx(EnvironmentProviderIrisApp, { children: jsxRuntime.jsx(ErrorHandlingProviderIrisApp, { errorHandler: errorHandler, children: jsxRuntime.jsx(ThemeCssProviderIrisApp, { children: jsxRuntime.jsx(TokenProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserPreferenceProviderIrisApp, { children: jsxRuntime.jsx(CurrentUserProviderIrisApp, { children: jsxRuntime.jsx(UserSubscriptionProviderIrisApp, { children: jsxRuntime.jsx(AnalyticsProviderIrisApp, { children: jsxRuntime.jsx(OemBrandingContextProviderIrisApp, { children: jsxRuntime.jsx(AssetSortingProviderIrisApp, { children: jsxRuntime.jsx(ManagerApolloProvider, { children: jsxRuntime.jsx(NavigationProviderIrisApp, { children: jsxRuntime.jsx(ToastProviderIrisApp, { children: jsxRuntime.jsx(ModalDialogContextProviderIrisApp, { children: jsxRuntime.jsx(ConfirmationDialogProviderIrisApp, { children: jsxRuntime.jsx(FilterBarProviderIrisApp, { children: jsxRuntime.jsx(TimeRangeProviderIrisApp, { children: jsxRuntime.jsx(WidgetConfigProviderIrisApp, { children: jsxRuntime.jsx(react.Suspense, { fallback: jsxRuntime.jsx(reactComponents.Spinner, { centering: "centered", dataTestId: "trackunit-providers" }), children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
685
666
  };
686
667
 
687
668
  exports.ManagerApolloProvider = ManagerApolloProvider;
package/index.esm.js CHANGED
@@ -7,7 +7,6 @@ import { getMainDefinition, Observable } from '@apollo/client/utilities';
7
7
  import { useEnvironment, useToken, useErrorHandler, AnalyticsContextProvider, AssetSortingProvider, ConfirmationDialogProvider, EnvironmentContextProvider, ErrorHandlingContextProvider, FilterBarProvider, ModalDialogContextProvider, NavigationContextProvider, OemBrandingContextProvider, TimeRangeProvider, ToastProvider, TokenProvider, CurrentUserProvider, CurrentUserPreferenceProvider, UserSubscriptionProvider, WidgetConfigProvider } from '@trackunit/react-core-hooks';
8
8
  import { print } from 'graphql';
9
9
  import { createClient } from 'graphql-sse';
10
- import * as React from 'react';
11
10
  import { useState, useMemo, useEffect, Suspense } from 'react';
12
11
  import '@js-temporal/polyfill';
13
12
  import { registerTranslations, initializeTranslationsForApp } from '@trackunit/i18n-library-translation';
@@ -444,7 +443,7 @@ const FilterBarProviderIrisApp = ({ children }) => {
444
443
  * This is a provider for the Modal Dialog Context.
445
444
  */
446
445
  const ModalDialogContextProviderIrisApp = ({ children }) => {
447
- const value = React.useMemo(() => ({ openModal: ModalDialogRuntime.openModal, closeModal: ModalDialogRuntime.closeModal }), []);
446
+ const value = useMemo(() => ({ openModal: ModalDialogRuntime.openModal, closeModal: ModalDialogRuntime.closeModal }), []);
448
447
  return jsx(ModalDialogContextProvider, { value: value, children: children });
449
448
  };
450
449
 
@@ -452,7 +451,7 @@ const ModalDialogContextProviderIrisApp = ({ children }) => {
452
451
  * This is a provider for the NavigationContext.
453
452
  */
454
453
  const NavigationProviderIrisApp = ({ children }) => {
455
- const environment = React.useMemo(() => {
454
+ const environment = useMemo(() => {
456
455
  return NavigationRuntime;
457
456
  }, []);
458
457
  return jsx(NavigationContextProvider, { value: environment, children: children });
@@ -634,8 +633,8 @@ const CurrentUserPreferenceProviderIrisApp = ({ children }) => {
634
633
  * This is a provider for the UserSubscriptionContext.
635
634
  */
636
635
  const UserSubscriptionProviderIrisApp = ({ children }) => {
637
- const [subscription, setSubscription] = React.useState(null);
638
- React.useEffect(() => {
636
+ const [subscription, setSubscription] = useState(null);
637
+ useEffect(() => {
639
638
  UserSubscriptionRuntime.getUserSubscriptionContext()
640
639
  .catch(() => null)
641
640
  .then(setSubscription);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "1.3.195",
3
+ "version": "1.3.197",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -11,15 +11,15 @@
11
11
  "react": "19.0.0",
12
12
  "@js-temporal/polyfill": "^0.4.4",
13
13
  "jest-fetch-mock": "^3.0.3",
14
- "@trackunit/iris-app-api": "1.3.146",
15
- "@trackunit/react-core-contexts-api": "1.4.146",
16
- "@trackunit/react-core-hooks": "1.3.151",
17
- "@trackunit/i18n-library-translation": "1.3.158",
18
- "@trackunit/react-components": "1.4.170",
19
- "@trackunit/iris-app-runtime-core": "1.4.149",
14
+ "@trackunit/iris-app-api": "1.3.148",
15
+ "@trackunit/react-core-contexts-api": "1.4.148",
16
+ "@trackunit/react-core-hooks": "1.3.153",
17
+ "@trackunit/i18n-library-translation": "1.3.160",
18
+ "@trackunit/react-components": "1.4.172",
19
+ "@trackunit/iris-app-runtime-core": "1.4.151",
20
20
  "graphql": "^16.10.0",
21
21
  "graphql-sse": "^2.5.4",
22
- "@trackunit/react-test-setup": "1.0.29"
22
+ "@trackunit/react-test-setup": "1.0.31"
23
23
  },
24
24
  "module": "./index.esm.js",
25
25
  "main": "./index.cjs.js",
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ import { ReactNode } from "react";
2
2
  interface Props {
3
- children: React.ReactNode;
3
+ children: ReactNode;
4
4
  }
5
5
  /**
6
6
  * This is a provider for the Modal Dialog Context.
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ import { ReactNode } from "react";
2
2
  interface IProps {
3
- children: React.ReactNode;
3
+ children: ReactNode;
4
4
  }
5
5
  /**
6
6
  * This is a provider for the NavigationContext.
@@ -1,6 +1,6 @@
1
- import * as React from "react";
1
+ import { ReactNode } from "react";
2
2
  interface IProps {
3
- children: React.ReactNode;
3
+ children: ReactNode;
4
4
  }
5
5
  /**
6
6
  * This is a provider for the UserSubscriptionContext.