Browse Source

fix(aot): Remove dependency to translate from StatelessAvatar.js

- translate uses interfaceConfig object which does not exist in AOT context
j8
hmuresan 3 years ago
parent
commit
b3e03fe50c
1 changed files with 4 additions and 12 deletions
  1. 4
    12
      react/features/base/avatar/components/web/StatelessAvatar.js

+ 4
- 12
react/features/base/avatar/components/web/StatelessAvatar.js View File

2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
 
4
 
5
-import { translate } from '../../../../base/i18n';
6
 import { Icon } from '../../../icons';
5
 import { Icon } from '../../../icons';
7
 import AbstractStatelessAvatar, { type Props as AbstractProps } from '../AbstractStatelessAvatar';
6
 import AbstractStatelessAvatar, { type Props as AbstractProps } from '../AbstractStatelessAvatar';
8
 
7
 
31
     /**
30
     /**
32
      * TestId of the element, if any.
31
      * TestId of the element, if any.
33
      */
32
      */
34
-    testId?: string,
35
-
36
-    /**
37
-     * Invoked to obtain translated strings.
38
-     */
39
-    t: Function
33
+    testId?: string
40
 };
34
 };
41
 
35
 
42
 /**
36
 /**
43
  * Implements a stateless avatar component that renders an avatar purely from what gets passed through
37
  * Implements a stateless avatar component that renders an avatar purely from what gets passed through
44
  * props.
38
  * props.
45
  */
39
  */
46
-class StatelessAvatar extends AbstractStatelessAvatar<Props> {
40
+export default class StatelessAvatar extends AbstractStatelessAvatar<Props> {
47
     /**
41
     /**
48
      * Implements {@code Component#render}.
42
      * Implements {@code Component#render}.
49
      *
43
      *
70
             return (
64
             return (
71
                 <div className = { this._getBadgeClassName() }>
65
                 <div className = { this._getBadgeClassName() }>
72
                     <img
66
                     <img
73
-                        alt = { this.props.t('profile.avatar') }
67
+                        alt = 'avatar'
74
                         className = { this._getAvatarClassName() }
68
                         className = { this._getAvatarClassName() }
75
                         data-testid = { this.props.testId }
69
                         data-testid = { this.props.testId }
76
                         id = { this.props.id }
70
                         id = { this.props.id }
111
         return (
105
         return (
112
             <div className = { this._getBadgeClassName() }>
106
             <div className = { this._getBadgeClassName() }>
113
                 <img
107
                 <img
114
-                    alt = { this.props.t('profile.avatar') }
108
+                    alt = 'avatar'
115
                     className = { this._getAvatarClassName('defaultAvatar') }
109
                     className = { this._getAvatarClassName('defaultAvatar') }
116
                     data-testid = { this.props.testId }
110
                     data-testid = { this.props.testId }
117
                     id = { this.props.id }
111
                     id = { this.props.id }
165
 
159
 
166
     _isIcon: (?string | ?Object) => boolean
160
     _isIcon: (?string | ?Object) => boolean
167
 }
161
 }
168
-
169
-export default translate(StatelessAvatar);

Loading…
Cancel
Save