fix(login): add missing keys to PlexLoginButton FormattedMessage children (#2291)
This commit is contained in:
@@ -3,6 +3,7 @@ import Button from '@app/components/Common/Button';
|
|||||||
import { SmallLoadingSpinner } from '@app/components/Common/LoadingSpinner';
|
import { SmallLoadingSpinner } from '@app/components/Common/LoadingSpinner';
|
||||||
import usePlexLogin from '@app/hooks/usePlexLogin';
|
import usePlexLogin from '@app/hooks/usePlexLogin';
|
||||||
import defineMessages from '@app/utils/defineMessages';
|
import defineMessages from '@app/utils/defineMessages';
|
||||||
|
import { Fragment } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
const messages = defineMessages('components.Login', {
|
const messages = defineMessages('components.Login', {
|
||||||
@@ -46,8 +47,12 @@ const PlexLoginButton = ({
|
|||||||
>
|
>
|
||||||
{(chunks) => (
|
{(chunks) => (
|
||||||
<>
|
<>
|
||||||
{chunks.map((c) =>
|
{chunks.map((c, index) =>
|
||||||
typeof c === 'string' ? <span>{c}</span> : c
|
typeof c === 'string' ? (
|
||||||
|
<span key={index}>{c}</span>
|
||||||
|
) : (
|
||||||
|
<Fragment key={index}>{c}</Fragment>
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user