@aarhus-university/au-lib-react-components 9.11.16 → 9.11.17

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "@aarhus-university/au-lib-react-components",
4
- "version": "9.11.16",
4
+ "version": "9.11.17",
5
5
  "description": "Library for shared React components for various applications on au.dk",
6
6
  "main": "build/cjs/index.js",
7
7
  "scripts": {
@@ -12,10 +12,10 @@ const AUProfileAvatarComponent = React.memo(({
12
12
  profileLabels,
13
13
  logoutUri,
14
14
  changeLanguageUrl,
15
+ lang,
15
16
  }) => {
16
17
  const {
17
18
  auId,
18
- preferredLanguage,
19
19
  firstNames,
20
20
  lastName,
21
21
  } = user;
@@ -32,10 +32,10 @@ const AUProfileAvatarComponent = React.memo(({
32
32
  className="nav__item nav__item--icon nav__item--icon--right"
33
33
  dataIcon=""
34
34
  text={firstNames}
35
- ariaLabel={`${profileLabels[preferredLanguage].profileFor} ${firstNames} ${lastName}`}
35
+ ariaLabel={`${profileLabels[lang].profileFor} ${firstNames} ${lastName}`}
36
36
  >
37
37
  <AUProfileWidgetComponent
38
- lang={preferredLanguage}
38
+ lang={lang}
39
39
  name={`${firstNames} ${lastName}`}
40
40
  auid={auId}
41
41
  settings={settings}
@@ -73,6 +73,7 @@ AUProfileAvatarComponent.propTypes = {
73
73
  profileLabels: PropTypes.shape({}).isRequired,
74
74
  logoutUri: PropTypes.string.isRequired,
75
75
  changeLanguageUrl: PropTypes.string,
76
+ lang: PropTypes.string.isRequired,
76
77
  };
77
78
 
78
79
  AUProfileAvatarComponent.displayName = 'AUProfileAvatarComponent';
@@ -23,7 +23,8 @@ const AUProfileWidgetComponent = React.memo(({
23
23
  className={`sub-nav__item ${s.classNames}`}
24
24
  href={s.url}
25
25
  data-icon={s.icon}
26
- data-gtm={s.dataGtm}>
26
+ data-gtm={s.dataGtm}
27
+ >
27
28
  {s.text}
28
29
  </a>
29
30
  );