mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-04-20 16:24:44 +00:00
Fix unique key in ui-notification-toast
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
31ca77ebfa
commit
b13c1ce8a0
1 changed files with 4 additions and 4 deletions
|
@ -74,13 +74,13 @@ export const UiNotificationToast: React.FC<UiNotificationProps> = ({
|
|||
|
||||
const buttonsDom = useMemo(
|
||||
() =>
|
||||
buttons?.map((button) => {
|
||||
buttons?.map((button, buttonIndex) => {
|
||||
const buttonClick = () => {
|
||||
button.onClick()
|
||||
dismissThisNotification()
|
||||
}
|
||||
return (
|
||||
<Button key={button.label} size={'sm'} onClick={buttonClick} variant={'link'}>
|
||||
<Button key={buttonIndex} size={'sm'} onClick={buttonClick} variant={'link'}>
|
||||
{button.label}
|
||||
</Button>
|
||||
)
|
||||
|
@ -89,9 +89,9 @@ export const UiNotificationToast: React.FC<UiNotificationProps> = ({
|
|||
)
|
||||
|
||||
const contentDom = useMemo(() => {
|
||||
return content.split('\n').map((value) => {
|
||||
return content.split('\n').map((value, lineNumber) => {
|
||||
return (
|
||||
<Fragment>
|
||||
<Fragment key={lineNumber}>
|
||||
{value}
|
||||
<br />
|
||||
</Fragment>
|
||||
|
|
Loading…
Add table
Reference in a new issue