fix the "Invalid prop propsFromTrigger supplied to React.Fragment. React.Fragment can only have key, ref, and children props." by bot using fragments in the menu

This commit is contained in:
Athou
2026-11-09 05:55:19 +01:00
parent 788ef941a1
commit f6e30a77da

View File

@@ -67,7 +67,6 @@ export function FeedEntryContextMenu(props: Readonly<FeedEntryContextMenuProps>)
<Separator /> <Separator />
{props.entry.markable && ( {props.entry.markable && (
<>
<Item <Item
onClick={async () => onClick={async () =>
await dispatch(starEntry({ entry: props.entry, starred: !props.entry.starred })) await dispatch(starEntry({ entry: props.entry, starred: !props.entry.starred }))
@@ -78,15 +77,14 @@ export function FeedEntryContextMenu(props: Readonly<FeedEntryContextMenuProps>)
{props.entry.starred ? <Trans>Unstar</Trans> : <Trans>Star</Trans>} {props.entry.starred ? <Trans>Unstar</Trans> : <Trans>Star</Trans>}
</Group> </Group>
</Item> </Item>
<Item )}
onClick={async () => await dispatch(markEntry({ entry: props.entry, read: !props.entry.read }))} {props.entry.markable && (
> <Item onClick={async () => await dispatch(markEntry({ entry: props.entry, read: !props.entry.read }))}>
<Group> <Group>
{props.entry.read ? <TbMail size={iconSize} /> : <TbMailOpened size={iconSize} />} {props.entry.read ? <TbMail size={iconSize} /> : <TbMailOpened size={iconSize} />}
{props.entry.read ? <Trans>Keep unread</Trans> : <Trans>Mark as read</Trans>} {props.entry.read ? <Trans>Keep unread</Trans> : <Trans>Mark as read</Trans>}
</Group> </Group>
</Item> </Item>
</>
)} )}
<Item onClick={async () => await dispatch(markEntriesUpToEntry(props.entry))}> <Item onClick={async () => await dispatch(markEntriesUpToEntry(props.entry))}>
<Group> <Group>
@@ -95,10 +93,8 @@ export function FeedEntryContextMenu(props: Readonly<FeedEntryContextMenuProps>)
</Group> </Group>
</Item> </Item>
{sourceType === "category" && <Separator />}
{sourceType === "category" && ( {sourceType === "category" && (
<>
<Separator />
<Item <Item
onClick={() => { onClick={() => {
dispatch(redirectToFeed(props.entry.feedId)) dispatch(redirectToFeed(props.entry.feedId))
@@ -109,7 +105,6 @@ export function FeedEntryContextMenu(props: Readonly<FeedEntryContextMenuProps>)
<Trans>Go to {truncate(props.entry.feedName, 30)}</Trans> <Trans>Go to {truncate(props.entry.feedName, 30)}</Trans>
</Group> </Group>
</Item> </Item>
</>
)} )}
</Menu> </Menu>
) )