@redocly/theme 0.11.0 → 0.11.1

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.
@@ -31,12 +31,13 @@ const React = __importStar(require("react"));
31
31
  const styled_components_1 = __importDefault(require("styled-components"));
32
32
  const Button_1 = require("../../components/Button/Button");
33
33
  const usePreloadHistory_1 = require("../../mocks/usePreloadHistory");
34
+ const usePageData_1 = require("../../mocks/hooks/usePageData");
34
35
  const Dropdown_1 = require("./Dropdown");
35
36
  function DevOnboardingTryItSecurity(props) {
36
37
  const apiId = props.apiId;
37
38
  const history = (0, usePreloadHistory_1.usePreloadHistory)();
38
39
  // @ts-ignore
39
- const { userData } = props;
40
+ const { userData } = (0, usePageData_1.usePageData)('userData') || {};
40
41
  // TODO: handle error
41
42
  const [_error, setError] = React.useState();
42
43
  const [apps, setApps] = React.useState();
@@ -3,6 +3,5 @@ export type TryItSecurityAppsProps = {
3
3
  apiId?: string;
4
4
  value?: string;
5
5
  onChange: (newSecretKey: string) => void;
6
- userData?: any;
7
6
  };
8
7
  export declare function TryItSecurityApps(props: TryItSecurityAppsProps): JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [],
6
6
  "author": "team@redocly.com",
@@ -5,6 +5,7 @@ import type { TryItSecurityAppsProps } from './TryItSecurityApps';
5
5
 
6
6
  import { Button } from '@theme/components/Button/Button';
7
7
  import { usePreloadHistory } from '@portal/usePreloadHistory';
8
+ import { usePageData } from '@portal/hooks/usePageData';
8
9
 
9
10
  import { Dropdown } from './Dropdown';
10
11
 
@@ -12,7 +13,7 @@ export function DevOnboardingTryItSecurity(props: TryItSecurityAppsProps) {
12
13
  const apiId = (props as any).apiId;
13
14
  const history = usePreloadHistory();
14
15
  // @ts-ignore
15
- const { userData } = props;
16
+ const { userData } = usePageData('userData') || {};
16
17
 
17
18
  // TODO: handle error
18
19
  const [_error, setError] = React.useState<string | undefined>();
@@ -8,7 +8,6 @@ export type TryItSecurityAppsProps = {
8
8
  apiId?: string;
9
9
  value?: string;
10
10
  onChange: (newSecretKey: string) => void;
11
- userData?: any;
12
11
  };
13
12
 
14
13
  export function TryItSecurityApps(props: TryItSecurityAppsProps) {