@selfcommunity/react-core 0.4.1-alpha.2 → 0.4.1-alpha.4
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/lib/cjs/components/provider/SCAlertMessagesProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCContextProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCContextProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCLocaleProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCLocaleProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCNotificationProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCNotificationProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCPreferencesProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCPreferencesProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCRoutingProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCRoutingProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCThemeProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCThemeProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCUserProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCUserProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCVoteProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCVoteProvider/index.js +1 -1
- package/lib/cjs/components/router/index.d.ts +1 -1
- package/lib/cjs/components/router/index.js +1 -1
- package/lib/cjs/hooks/useSCAuth.d.ts +1 -1
- package/lib/cjs/hooks/useSCAuth.js +1 -1
- package/lib/cjs/hooks/useSCBlockedUsersManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCBlockedUsersManager.js +1 -1
- package/lib/cjs/hooks/useSCConnectionsManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCConnectionsManager.js +1 -1
- package/lib/cjs/hooks/useSCFetchBroadcastMessages.d.ts +1 -1
- package/lib/cjs/hooks/useSCFetchBroadcastMessages.js +1 -1
- package/lib/cjs/hooks/useSCFetchCategories.d.ts +1 -1
- package/lib/cjs/hooks/useSCFetchCategories.js +1 -1
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.d.ts +1 -1
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.js +1 -1
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.js +1 -1
- package/lib/cjs/hooks/useSCFollowedManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCFollowedManager.js +1 -1
- package/lib/cjs/hooks/useSCFollowersManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCFollowersManager.js +1 -1
- package/lib/cjs/hooks/useSCSettingsManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCSettingsManager.js +1 -1
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js +1 -1
- package/lib/cjs/hooks/useSCUserIsBlocked.d.ts +1 -1
- package/lib/cjs/hooks/useSCUserIsBlocked.js +1 -1
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.js +1 -1
- package/lib/esm/components/provider/SCContextProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCContextProvider/index.js +1 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.js +1 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.js +1 -1
- package/lib/esm/components/provider/SCPreferencesProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCPreferencesProvider/index.js +1 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.js +1 -1
- package/lib/esm/components/provider/SCThemeProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCThemeProvider/index.js +1 -1
- package/lib/esm/components/provider/SCUserProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCUserProvider/index.js +1 -1
- package/lib/esm/components/provider/SCVoteProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCVoteProvider/index.js +1 -1
- package/lib/esm/components/router/index.d.ts +1 -1
- package/lib/esm/components/router/index.js +1 -1
- package/lib/esm/hooks/useSCAuth.d.ts +1 -1
- package/lib/esm/hooks/useSCAuth.js +1 -1
- package/lib/esm/hooks/useSCBlockedUsersManager.d.ts +1 -1
- package/lib/esm/hooks/useSCBlockedUsersManager.js +1 -1
- package/lib/esm/hooks/useSCConnectionsManager.d.ts +1 -1
- package/lib/esm/hooks/useSCConnectionsManager.js +1 -1
- package/lib/esm/hooks/useSCFetchBroadcastMessages.d.ts +1 -1
- package/lib/esm/hooks/useSCFetchBroadcastMessages.js +1 -1
- package/lib/esm/hooks/useSCFetchCategories.d.ts +1 -1
- package/lib/esm/hooks/useSCFetchCategories.js +1 -1
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.d.ts +1 -1
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.js +1 -1
- package/lib/esm/hooks/useSCFollowedCategoriesManager.d.ts +1 -1
- package/lib/esm/hooks/useSCFollowedCategoriesManager.js +2 -2
- package/lib/esm/hooks/useSCFollowedManager.d.ts +1 -1
- package/lib/esm/hooks/useSCFollowedManager.js +1 -1
- package/lib/esm/hooks/useSCFollowersManager.d.ts +1 -1
- package/lib/esm/hooks/useSCFollowersManager.js +1 -1
- package/lib/esm/hooks/useSCSettingsManager.d.ts +1 -1
- package/lib/esm/hooks/useSCSettingsManager.js +1 -1
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.d.ts +1 -1
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js +2 -2
- package/lib/esm/hooks/useSCUserIsBlocked.d.ts +1 -1
- package/lib/esm/hooks/useSCUserIsBlocked.js +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ import { SCAlertMessagesContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
```jsx
|
|
8
8
|
1. <SCAlertMessagesContext.Consumer>{(options,) => (...)}</SCAlertMessagesContext.Consumer>
|
|
9
9
|
```
|
|
@@ -7,7 +7,7 @@ const notistack_1 = require("notistack");
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates Global Context
|
|
9
9
|
*
|
|
10
|
-
:::
|
|
10
|
+
:::tip Context can be consumed in one of the following ways:
|
|
11
11
|
```jsx
|
|
12
12
|
1. <SCAlertMessagesContext.Consumer>{(options,) => (...)}</SCAlertMessagesContext.Consumer>
|
|
13
13
|
```
|
|
@@ -3,7 +3,7 @@ import { SCContextProviderType, SCContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
```jsx
|
|
8
8
|
1. <SCContext.Consumer>{settings => (...)}</SCContext.Consumer>
|
|
9
9
|
```
|
|
@@ -10,7 +10,7 @@ const useIsComponentMountedRef_1 = tslib_1.__importDefault(require("../../../uti
|
|
|
10
10
|
/**
|
|
11
11
|
* Creates Global Context
|
|
12
12
|
*
|
|
13
|
-
:::
|
|
13
|
+
:::tip Context can be consumed in one of the following ways:
|
|
14
14
|
```jsx
|
|
15
15
|
1. <SCContext.Consumer>{settings => (...)}</SCContext.Consumer>
|
|
16
16
|
```
|
|
@@ -3,7 +3,7 @@ import { SCLocaleContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
|
|
8
8
|
```jsx
|
|
9
9
|
1. <SCLocaleContext.Consumer>{(locale,) => (...)}</SCLocaleContext.Consumer>
|
|
@@ -13,7 +13,7 @@ const use_deep_compare_effect_1 = require("use-deep-compare-effect");
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates Global Context
|
|
15
15
|
*
|
|
16
|
-
:::
|
|
16
|
+
:::tip Context can be consumed in one of the following ways:
|
|
17
17
|
|
|
18
18
|
```jsx
|
|
19
19
|
1. <SCLocaleContext.Consumer>{(locale,) => (...)}</SCLocaleContext.Consumer>
|
|
@@ -3,7 +3,7 @@ import { SCNotificationContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
|
|
8
8
|
```jsx
|
|
9
9
|
1. <SCNotificationContext.Consumer>{(wsInstance, subscribe,) => (...)}</SCNotificationContext.Consumer>
|
|
@@ -9,7 +9,7 @@ const useSCMobileNativePushMessaging_1 = tslib_1.__importDefault(require("../../
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates Global Context
|
|
11
11
|
*
|
|
12
|
-
:::
|
|
12
|
+
:::tip Context can be consumed in one of the following ways:
|
|
13
13
|
|
|
14
14
|
```jsx
|
|
15
15
|
1. <SCNotificationContext.Consumer>{(wsInstance, subscribe,) => (...)}</SCNotificationContext.Consumer>
|
|
@@ -3,7 +3,7 @@ import { SCThemeContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
|
|
8
8
|
```jsx
|
|
9
9
|
1. <SCThemeContext.Consumer>{(theme,) => (...)}</SCThemeContext.Consumer>
|
|
@@ -11,7 +11,7 @@ const use_deep_compare_effect_1 = require("use-deep-compare-effect");
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates Global Context
|
|
13
13
|
*
|
|
14
|
-
:::
|
|
14
|
+
:::tip Context can be consumed in one of the following ways:
|
|
15
15
|
|
|
16
16
|
```jsx
|
|
17
17
|
1. <SCThemeContext.Consumer>{(theme,) => (...)}</SCThemeContext.Consumer>
|
|
@@ -22,7 +22,7 @@ const Session = tslib_1.__importStar(require("../../../constants/Session"));
|
|
|
22
22
|
/**
|
|
23
23
|
* SCUserContext (Authentication Context)
|
|
24
24
|
*
|
|
25
|
-
:::
|
|
25
|
+
:::tip Context can be consumed in one of the following ways:
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
```jsx
|
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
```jsx
|
|
12
12
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
13
13
|
````
|
|
14
|
-
:::
|
|
14
|
+
:::tip Usage Example:
|
|
15
15
|
|
|
16
16
|
```jsx
|
|
17
17
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -38,7 +38,7 @@ const Link = (_a, ref) => {
|
|
|
38
38
|
```jsx
|
|
39
39
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
40
40
|
````
|
|
41
|
-
:::
|
|
41
|
+
:::tip Usage Example:
|
|
42
42
|
|
|
43
43
|
```jsx
|
|
44
44
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -31,7 +31,7 @@ export declare const userActionTypes: {
|
|
|
31
31
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
32
32
|
````
|
|
33
33
|
|
|
34
|
-
:::
|
|
34
|
+
:::tip Usage Example:
|
|
35
35
|
|
|
36
36
|
```jsx
|
|
37
37
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -114,7 +114,7 @@ function stateInitializer(session) {
|
|
|
114
114
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
115
115
|
````
|
|
116
116
|
|
|
117
|
-
:::
|
|
117
|
+
:::tip Usage Example:
|
|
118
118
|
|
|
119
119
|
```jsx
|
|
120
120
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -7,7 +7,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
7
7
|
@param object
|
|
8
8
|
@param object.cacheStrategy
|
|
9
9
|
|
|
10
|
-
:::
|
|
10
|
+
:::tip Context can be consumed in this way:
|
|
11
11
|
|
|
12
12
|
```jsx
|
|
13
13
|
const {messages, isLoading} = useSCFetchBroadcastMessages();
|
|
@@ -24,7 +24,7 @@ const initialData = { results: [], next: broadcastMessagesRefreshUrl, previous:
|
|
|
24
24
|
@param object
|
|
25
25
|
@param object.cacheStrategy
|
|
26
26
|
|
|
27
|
-
:::
|
|
27
|
+
:::tip Context can be consumed in this way:
|
|
28
28
|
|
|
29
29
|
```jsx
|
|
30
30
|
const {messages, isLoading} = useSCFetchBroadcastMessages();
|
|
@@ -6,7 +6,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
6
6
|
@param object
|
|
7
7
|
@param object.cacheStrategy
|
|
8
8
|
|
|
9
|
-
:::
|
|
9
|
+
:::tip Context can be consumed in this way:
|
|
10
10
|
|
|
11
11
|
```jsx
|
|
12
12
|
const {categories, isLoading} = useSCFetchCategories();
|
|
@@ -5,7 +5,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
5
5
|
This custom hook is used to fetch snippets.
|
|
6
6
|
@param object.cacheStrategy
|
|
7
7
|
|
|
8
|
-
:::
|
|
8
|
+
:::tip Context can be consumed in this way:
|
|
9
9
|
|
|
10
10
|
```jsx
|
|
11
11
|
const {snippets, isLoading} = useSCFetchPrivateMessageSnippets();
|
|
@@ -28,7 +28,7 @@ const hydrate = (ids) => {
|
|
|
28
28
|
This custom hook is used to fetch snippets.
|
|
29
29
|
@param object.cacheStrategy
|
|
30
30
|
|
|
31
|
-
:::
|
|
31
|
+
:::tip Context can be consumed in this way:
|
|
32
32
|
|
|
33
33
|
```jsx
|
|
34
34
|
const {snippets, isLoading} = useSCFetchPrivateMessageSnippets();
|
|
@@ -4,7 +4,7 @@ import { SCCategoryType, SCUserType } from '@selfcommunity/types';
|
|
|
4
4
|
This custom hook is used to manage the categories followed.
|
|
5
5
|
:::
|
|
6
6
|
|
|
7
|
-
:::
|
|
7
|
+
:::tip How to use it:
|
|
8
8
|
Follow these steps:
|
|
9
9
|
```jsx
|
|
10
10
|
1. const scUserContext: SCUserContextType = useSCUser();
|
|
@@ -11,7 +11,7 @@ const utils_1 = require("@selfcommunity/utils");
|
|
|
11
11
|
This custom hook is used to manage the categories followed.
|
|
12
12
|
:::
|
|
13
13
|
|
|
14
|
-
:::
|
|
14
|
+
:::tip How to use it:
|
|
15
15
|
Follow these steps:
|
|
16
16
|
```jsx
|
|
17
17
|
1. const scUserContext: SCUserContextType = useSCUser();
|
|
@@ -8,7 +8,7 @@ const SCUserProvider_1 = require("../components/provider/SCUserProvider");
|
|
|
8
8
|
:::info
|
|
9
9
|
This custom hook is used to check if the user is blocked by me or I am blocked by him.
|
|
10
10
|
:::
|
|
11
|
-
:::
|
|
11
|
+
:::tip How to use it:
|
|
12
12
|
|
|
13
13
|
Follow these steps:
|
|
14
14
|
```jsx
|
|
@@ -3,7 +3,7 @@ import { SCAlertMessagesContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
```jsx
|
|
8
8
|
1. <SCAlertMessagesContext.Consumer>{(options,) => (...)}</SCAlertMessagesContext.Consumer>
|
|
9
9
|
```
|
|
@@ -3,7 +3,7 @@ import { SnackbarProvider } from 'notistack';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
```jsx
|
|
8
8
|
1. <SCAlertMessagesContext.Consumer>{(options,) => (...)}</SCAlertMessagesContext.Consumer>
|
|
9
9
|
```
|
|
@@ -3,7 +3,7 @@ import { SCContextProviderType, SCContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
```jsx
|
|
8
8
|
1. <SCContext.Consumer>{settings => (...)}</SCContext.Consumer>
|
|
9
9
|
```
|
|
@@ -6,7 +6,7 @@ import useIsComponentMountedRef from '../../../utils/hooks/useIsComponentMounted
|
|
|
6
6
|
/**
|
|
7
7
|
* Creates Global Context
|
|
8
8
|
*
|
|
9
|
-
:::
|
|
9
|
+
:::tip Context can be consumed in one of the following ways:
|
|
10
10
|
```jsx
|
|
11
11
|
1. <SCContext.Consumer>{settings => (...)}</SCContext.Consumer>
|
|
12
12
|
```
|
|
@@ -3,7 +3,7 @@ import { SCLocaleContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
|
|
8
8
|
```jsx
|
|
9
9
|
1. <SCLocaleContext.Consumer>{(locale,) => (...)}</SCLocaleContext.Consumer>
|
|
@@ -9,7 +9,7 @@ import { useDeepCompareEffectNoCheck } from 'use-deep-compare-effect';
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates Global Context
|
|
11
11
|
*
|
|
12
|
-
:::
|
|
12
|
+
:::tip Context can be consumed in one of the following ways:
|
|
13
13
|
|
|
14
14
|
```jsx
|
|
15
15
|
1. <SCLocaleContext.Consumer>{(locale,) => (...)}</SCLocaleContext.Consumer>
|
|
@@ -3,7 +3,7 @@ import { SCNotificationContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
|
|
8
8
|
```jsx
|
|
9
9
|
1. <SCNotificationContext.Consumer>{(wsInstance, subscribe,) => (...)}</SCNotificationContext.Consumer>
|
|
@@ -5,7 +5,7 @@ import useSCMobileNativePushMessaging from '../../../hooks/useSCMobileNativePush
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates Global Context
|
|
7
7
|
*
|
|
8
|
-
:::
|
|
8
|
+
:::tip Context can be consumed in one of the following ways:
|
|
9
9
|
|
|
10
10
|
```jsx
|
|
11
11
|
1. <SCNotificationContext.Consumer>{(wsInstance, subscribe,) => (...)}</SCNotificationContext.Consumer>
|
|
@@ -3,7 +3,7 @@ import { SCThemeContextType } from '../../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates Global Context
|
|
5
5
|
*
|
|
6
|
-
:::
|
|
6
|
+
:::tip Context can be consumed in one of the following ways:
|
|
7
7
|
|
|
8
8
|
```jsx
|
|
9
9
|
1. <SCThemeContext.Consumer>{(theme,) => (...)}</SCThemeContext.Consumer>
|
|
@@ -7,7 +7,7 @@ import { useDeepCompareEffectNoCheck } from 'use-deep-compare-effect';
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates Global Context
|
|
9
9
|
*
|
|
10
|
-
:::
|
|
10
|
+
:::tip Context can be consumed in one of the following ways:
|
|
11
11
|
|
|
12
12
|
```jsx
|
|
13
13
|
1. <SCThemeContext.Consumer>{(theme,) => (...)}</SCThemeContext.Consumer>
|
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
```jsx
|
|
12
12
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
13
13
|
````
|
|
14
|
-
:::
|
|
14
|
+
:::tip Usage Example:
|
|
15
15
|
|
|
16
16
|
```jsx
|
|
17
17
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -36,7 +36,7 @@ const Link = (_a, ref) => {
|
|
|
36
36
|
```jsx
|
|
37
37
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
38
38
|
````
|
|
39
|
-
:::
|
|
39
|
+
:::tip Usage Example:
|
|
40
40
|
|
|
41
41
|
```jsx
|
|
42
42
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -31,7 +31,7 @@ export declare const userActionTypes: {
|
|
|
31
31
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
32
32
|
````
|
|
33
33
|
|
|
34
|
-
:::
|
|
34
|
+
:::tip Usage Example:
|
|
35
35
|
|
|
36
36
|
```jsx
|
|
37
37
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -111,7 +111,7 @@ function stateInitializer(session) {
|
|
|
111
111
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
112
112
|
````
|
|
113
113
|
|
|
114
|
-
:::
|
|
114
|
+
:::tip Usage Example:
|
|
115
115
|
|
|
116
116
|
```jsx
|
|
117
117
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -7,7 +7,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
7
7
|
@param object
|
|
8
8
|
@param object.cacheStrategy
|
|
9
9
|
|
|
10
|
-
:::
|
|
10
|
+
:::tip Context can be consumed in this way:
|
|
11
11
|
|
|
12
12
|
```jsx
|
|
13
13
|
const {messages, isLoading} = useSCFetchBroadcastMessages();
|
|
@@ -22,7 +22,7 @@ const initialData = { results: [], next: broadcastMessagesRefreshUrl, previous:
|
|
|
22
22
|
@param object
|
|
23
23
|
@param object.cacheStrategy
|
|
24
24
|
|
|
25
|
-
:::
|
|
25
|
+
:::tip Context can be consumed in this way:
|
|
26
26
|
|
|
27
27
|
```jsx
|
|
28
28
|
const {messages, isLoading} = useSCFetchBroadcastMessages();
|
|
@@ -6,7 +6,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
6
6
|
@param object
|
|
7
7
|
@param object.cacheStrategy
|
|
8
8
|
|
|
9
|
-
:::
|
|
9
|
+
:::tip Context can be consumed in this way:
|
|
10
10
|
|
|
11
11
|
```jsx
|
|
12
12
|
const {categories, isLoading} = useSCFetchCategories();
|
|
@@ -5,7 +5,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
5
5
|
This custom hook is used to fetch snippets.
|
|
6
6
|
@param object.cacheStrategy
|
|
7
7
|
|
|
8
|
-
:::
|
|
8
|
+
:::tip Context can be consumed in this way:
|
|
9
9
|
|
|
10
10
|
```jsx
|
|
11
11
|
const {snippets, isLoading} = useSCFetchPrivateMessageSnippets();
|
|
@@ -26,7 +26,7 @@ const hydrate = (ids) => {
|
|
|
26
26
|
This custom hook is used to fetch snippets.
|
|
27
27
|
@param object.cacheStrategy
|
|
28
28
|
|
|
29
|
-
:::
|
|
29
|
+
:::tip Context can be consumed in this way:
|
|
30
30
|
|
|
31
31
|
```jsx
|
|
32
32
|
const {snippets, isLoading} = useSCFetchPrivateMessageSnippets();
|
|
@@ -4,7 +4,7 @@ import { SCCategoryType, SCUserType } from '@selfcommunity/types';
|
|
|
4
4
|
This custom hook is used to manage the categories followed.
|
|
5
5
|
:::
|
|
6
6
|
|
|
7
|
-
:::
|
|
7
|
+
:::tip How to use it:
|
|
8
8
|
Follow these steps:
|
|
9
9
|
```jsx
|
|
10
10
|
1. const scUserContext: SCUserContextType = useSCUser();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useMemo } from
|
|
1
|
+
import { useEffect, useMemo } from 'react';
|
|
2
2
|
import { http, Endpoints } from '@selfcommunity/api-services';
|
|
3
3
|
import useSCCachingManager from './useSCCachingManager';
|
|
4
4
|
import { SCOPE_SC_CORE } from '../constants/Errors';
|
|
@@ -8,7 +8,7 @@ import { Logger } from '@selfcommunity/utils';
|
|
|
8
8
|
This custom hook is used to manage the categories followed.
|
|
9
9
|
:::
|
|
10
10
|
|
|
11
|
-
:::
|
|
11
|
+
:::tip How to use it:
|
|
12
12
|
Follow these steps:
|
|
13
13
|
```jsx
|
|
14
14
|
1. const scUserContext: SCUserContextType = useSCUser();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useMemo } from
|
|
1
|
+
import { useEffect, useMemo } from 'react';
|
|
2
2
|
import { http, Endpoints } from '@selfcommunity/api-services';
|
|
3
3
|
import { Logger } from '@selfcommunity/utils';
|
|
4
4
|
import { SCOPE_SC_CORE } from '../constants/Errors';
|
|
@@ -7,7 +7,7 @@ import useSCCachingManager from './useSCCachingManager';
|
|
|
7
7
|
:::info
|
|
8
8
|
This custom hook is used to manage to manage subscribed incubators.
|
|
9
9
|
:::
|
|
10
|
-
:::
|
|
10
|
+
:::tip How to use it:
|
|
11
11
|
|
|
12
12
|
Follow these steps:
|
|
13
13
|
```jsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfcommunity/react-core",
|
|
3
|
-
"version": "0.4.1-alpha.
|
|
3
|
+
"version": "0.4.1-alpha.4",
|
|
4
4
|
"description": "React Core Components useful for integrating UI Community components (react-ui).",
|
|
5
5
|
"author": "SelfCommunity <https://www.selfcommunity.com>",
|
|
6
6
|
"homepage": "https://www.selfcommunity.com",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"react-intl": "^6.4.7"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@selfcommunity/api-services": "^0.4.1-alpha.
|
|
71
|
+
"@selfcommunity/api-services": "^0.4.1-alpha.4",
|
|
72
72
|
"@selfcommunity/react-i18n": "^0.5.1-alpha.0",
|
|
73
73
|
"@selfcommunity/types": "^0.5.1-alpha.0",
|
|
74
74
|
"@selfcommunity/utils": "^0.2.1-alpha.0",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"bugs": {
|
|
126
126
|
"url": "https://github.com/selfcommunity/community-js/issues"
|
|
127
127
|
},
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "6572d63e375015bacd5f42a5c036caa29adc8b97"
|
|
129
129
|
}
|