-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some react warnings #5877
Fix some react warnings #5877
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,9 +233,9 @@ export class LanguageToolsBase extends React.Component<Props> { | |
</Tr> | ||
); | ||
}) | ||
: Array(50).fill( | ||
// eslint-disable-next-line react/jsx-indent | ||
<Tr> | ||
: Array.from(Array(50)).map((_, i) => ( | ||
// eslint-disable-next-line react/jsx-indent, react/no-array-index-key | ||
<Tr key={`LoadingText-${i}`}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to specify keys all the time when we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeh i think any child in an array or iterator we do, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep |
||
<Td> | ||
<LoadingText /> | ||
</Td> | ||
|
@@ -245,8 +245,8 @@ export class LanguageToolsBase extends React.Component<Props> { | |
<Td> | ||
<LoadingText /> | ||
</Td> | ||
</Tr>, | ||
)} | ||
</Tr> | ||
))} | ||
</Tbody> | ||
</Table> | ||
</Card> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ export function getNoScriptStyles( | |
`src/${appName}/noscript.css`, | ||
); | ||
try { | ||
return fs.readFileSync(cssPath); | ||
return fs.readFileSync(cssPath, 'utf8'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't recall the error but we should really pass the encoding in |
||
} catch (e) { | ||
if (e.code !== 'ENOENT') { | ||
_log.info(`noscript styles could not be parsed from ${cssPath}`); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, didn't expect that but seems this is ok..