Skip to content

Commit

Permalink
Fix react warning in about dialog (#2428)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Laux committed Nov 28, 2021
1 parent dba2945 commit 5f4f5d8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
- Fix messagelist not being at the correct position after fetching more messages
- Fix group names/contact names & contact email addresses not being selectable
- Fix scanning QRCode again while the Dialog is still open
- Fix react warning in about dialog (#2428)

### Changed
- use strict typescript for ui code
Expand Down
22 changes: 15 additions & 7 deletions src/renderer/components/dialogs/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,30 @@ export default function About(props: { isOpen: boolean; onClose: () => void }) {
const desktopString = reactStringReplace(
tx('about_offical_app_desktop'),
'Delta Chat',
() => (
<ClickableLink href='https://delta.chat'>{'Delta Chat'}</ClickableLink>
(_match, _index, offset) => (
<ClickableLink key={offset} href='https://delta.chat'>
{'Delta Chat'}
</ClickableLink>
)
)
let versionString = reactStringReplace(
tx('about_licensed_under_desktop'),
'GNU GPL version 3',
() => (
<ClickableLink href={gitHubLicenseUrl}>
(_match, _index, offset) => (
<ClickableLink key={offset} href={gitHubLicenseUrl}>
{'GNU GPL version 3'}
</ClickableLink>
)
)
versionString = reactStringReplace(versionString, 'GitHub', () => (
<ClickableLink href={gitHubUrl}>{'GitHub'}</ClickableLink>
))
versionString = reactStringReplace(
versionString,
'GitHub',
(_match, _index, offset) => (
<ClickableLink key={offset} href={gitHubUrl}>
{'GitHub'}
</ClickableLink>
)
)

return (
<DeltaDialog
Expand Down

0 comments on commit 5f4f5d8

Please sign in to comment.