mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04: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(
|
const buttonsDom = useMemo(
|
||||||
() =>
|
() =>
|
||||||
buttons?.map((button) => {
|
buttons?.map((button, buttonIndex) => {
|
||||||
const buttonClick = () => {
|
const buttonClick = () => {
|
||||||
button.onClick()
|
button.onClick()
|
||||||
dismissThisNotification()
|
dismissThisNotification()
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Button key={button.label} size={'sm'} onClick={buttonClick} variant={'link'}>
|
<Button key={buttonIndex} size={'sm'} onClick={buttonClick} variant={'link'}>
|
||||||
{button.label}
|
{button.label}
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
|
@ -89,9 +89,9 @@ export const UiNotificationToast: React.FC<UiNotificationProps> = ({
|
||||||
)
|
)
|
||||||
|
|
||||||
const contentDom = useMemo(() => {
|
const contentDom = useMemo(() => {
|
||||||
return content.split('\n').map((value) => {
|
return content.split('\n').map((value, lineNumber) => {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment key={lineNumber}>
|
||||||
{value}
|
{value}
|
||||||
<br />
|
<br />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue