Skip to content

Commit b8891fc

Browse files
committed
Fix some errors
1 parent 9636fe9 commit b8891fc

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/components/Generator/Generator.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,18 @@ const Generator = () => {
144144
input={inputs.dialCode}
145145
onChange={handleChange}
146146
disabled={!inputs.phone.enabled}
147+
aria-label="Dial code"
147148
className={classNames(
148149
styles.dialCode,
149150
'custom-select',
150151
'flex-grow-0'
151152
)}
152153
>
153-
{dialCodes.map(
154-
({ dialCode, code }) => (
155-
<option key={dialCode}>
156-
{code}
157-
</option>
158-
)
159-
)}
154+
{dialCodes.map(({ code }) => (
155+
<option key={code}>
156+
{code}
157+
</option>
158+
))}
160159
</InfoInput>
161160
)}
162161
/>

src/components/Generator/InfoFormGroup/InfoFormGroup.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ const AddOn = ({ type, text, children }) => {
2828

2929
AddOn.propTypes = {
3030
type: string.isRequired,
31-
text: oneOfType([string, bool]).isRequired,
32-
children: oneOfType([node, arrayOf(node)])
31+
text: oneOfType([node, arrayOf(node), func]),
32+
children: oneOfType([node, arrayOf(node), func])
3333
};
3434

3535
AddOn.defaultProps = {
36+
text: null,
3637
children: null
3738
};
3839

0 commit comments

Comments
 (0)