@homecode/ui 4.18.30 → 4.18.32

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,9 +31,12 @@ const Router = (props) => {
31
31
  }
32
32
  // @ts-ignore
33
33
  const isRouteComponent = child.type.displayName === 'Route';
34
- const { path, exact, component: Component, ...rest } = child.props;
34
+ const { path, queryParam, exact, component: Component, ...rest } = child.props;
35
35
  if (!path) {
36
- if (isRouteComponent && Component) {
36
+ const isMatched = queryParam
37
+ ? router.query[queryParam]
38
+ : isRouteComponent && Component;
39
+ if (isMatched) {
37
40
  noMatchRoute = jsx(Component, { ...rest });
38
41
  continue;
39
42
  }
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: () => JSX.Element;
2
3
  export default _default;
@@ -7,6 +7,7 @@ export type RedirectProps = {
7
7
  export type RouteProps = {
8
8
  className?: string;
9
9
  path: string;
10
+ queryParam?: string;
10
11
  component: ComponentType;
11
12
  exact?: boolean;
12
13
  } & Partial<RedirectProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.18.30",
3
+ "version": "4.18.32",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -48,7 +48,7 @@
48
48
  "fastest-validator": "^1.16.0",
49
49
  "favicons": "^7.1.3",
50
50
  "favicons-webpack-plugin": "^6.0.0",
51
- "justorm": "^3.0.0-beta-8",
51
+ "justorm": "^3.0.0-beta-10",
52
52
  "lodash.omit": "^4.5.0",
53
53
  "lodash.pick": "^4.4.0",
54
54
  "moment": "^2.29.4",