@bloom-housing/ui-components 4.2.2-alpha.13 → 4.2.2-alpha.14

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.2.2-alpha.14](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.13...@bloom-housing/ui-components@4.2.2-alpha.14) (2022-04-22)
7
+
8
+
9
+ ### Features
10
+
11
+ * swap anchor tags with LinkComponent for language routes ([#2686](https://github.com/bloom-housing/bloom/issues/2686)) ([a397930](https://github.com/bloom-housing/bloom/commit/a3979306fe39acd7b424a9e7364d791ad77fa2d0))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [4.2.2-alpha.13](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.12...@bloom-housing/ui-components@4.2.2-alpha.13) (2022-04-22)
7
18
 
8
19
  **Note:** Version bump only for package @bloom-housing/ui-components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "4.2.2-alpha.13",
3
+ "version": "4.2.2-alpha.14",
4
4
  "author": "Sean Albert <sean.albert@exygy.com>",
5
5
  "description": "Shared user interface components for Bloom affordable housing system",
6
6
  "homepage": "https://github.com/bloom-housing/bloom/tree/master/shared/ui-components",
@@ -102,5 +102,5 @@
102
102
  "tailwindcss": "2.2.10",
103
103
  "typesafe-actions": "^5.1.0"
104
104
  },
105
- "gitHead": "b9236b9c931e6dfbfab0552982f8589ec1badb85"
105
+ "gitHead": "1ecd2dfc8b98b66332c836dfd14c5fa17ddede83"
106
106
  }
@@ -1,5 +1,6 @@
1
- import React from "react"
1
+ import React, { useContext } from "react"
2
2
  import "./DashBlocks.scss"
3
+ import { NavigationContext } from "../config/NavigationContext"
3
4
 
4
5
  interface DashBlockProps {
5
6
  href?: string
@@ -10,6 +11,7 @@ interface DashBlockProps {
10
11
  dataTestId?: string
11
12
  }
12
13
  const DashBlock = (props: DashBlockProps) => {
14
+ const { LinkComponent } = useContext(NavigationContext)
13
15
  const { href, title, subtitle, icon, children } = props
14
16
  let content, wrapper
15
17
  if (children) {
@@ -24,9 +26,9 @@ const DashBlock = (props: DashBlockProps) => {
24
26
  )
25
27
  if (href) {
26
28
  wrapper = (
27
- <a href={href} className="dash-item">
29
+ <LinkComponent href={href} className="dash-item">
28
30
  {header}
29
- </a>
31
+ </LinkComponent>
30
32
  )
31
33
  } else {
32
34
  wrapper = (