Skip to content

Commit

Permalink
fix(react-tinacms-github): fix missing unique "key" prop in modal act…
Browse files Browse the repository at this point in the history
…ions

Also replace deprecated ModalPopup with PopupModal.
  • Loading branch information
travismiller committed Feb 13, 2021
1 parent a22063f commit 475bafa
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/react-tinacms-github/src/components/ActionableModal.tsx
Expand Up @@ -20,10 +20,10 @@ import React from 'react'
import { StyleReset, Button as TinaButton } from '@tinacms/styles'
import {
Modal,
ModalPopup,
ModalBody,
ModalActions,
ModalHeader,
PopupModal,
} from 'tinacms'

export interface ActionableModalOptions {
Expand All @@ -44,19 +44,23 @@ export const ActionableModal = ({
return (
<StyleReset>
<Modal>
<ModalPopup>
<PopupModal>
<ModalHeader>{title}</ModalHeader>
<ModalBody padded>
<p>{message}</p>
</ModalBody>
<ModalActions>
{actions.map(action => (
<TinaButton primary={action.primary} onClick={action.action}>
{actions.map((action, index) => (
<TinaButton
key={index}
primary={action.primary}
onClick={action.action}
>
{action.name}
</TinaButton>
))}
</ModalActions>
</ModalPopup>
</PopupModal>
</Modal>
</StyleReset>
)
Expand Down

0 comments on commit 475bafa

Please sign in to comment.