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,26 +67,24 @@ 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 })) }
} >
> <Group>
<Group> {props.entry.starred ? <TbStarOff size={iconSize} /> : <TbStar size={iconSize} />}
{props.entry.starred ? <TbStarOff size={iconSize} /> : <TbStar size={iconSize} />} {props.entry.starred ? <Trans>Unstar</Trans> : <Trans>Star</Trans>}
{props.entry.starred ? <Trans>Unstar</Trans> : <Trans>Star</Trans>} </Group>
</Group> </Item>
</Item> )}
<Item {props.entry.markable && (
onClick={async () => await dispatch(markEntry({ entry: props.entry, read: !props.entry.read }))} <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,21 +93,18 @@ export function FeedEntryContextMenu(props: Readonly<FeedEntryContextMenuProps>)
</Group> </Group>
</Item> </Item>
{sourceType === "category" && <Separator />}
{sourceType === "category" && ( {sourceType === "category" && (
<> <Item
<Separator /> onClick={() => {
dispatch(redirectToFeed(props.entry.feedId))
<Item }}
onClick={() => { >
dispatch(redirectToFeed(props.entry.feedId)) <Group>
}} <TbRss size={iconSize} />
> <Trans>Go to {truncate(props.entry.feedName, 30)}</Trans>
<Group> </Group>
<TbRss size={iconSize} /> </Item>
<Trans>Go to {truncate(props.entry.feedName, 30)}</Trans>
</Group>
</Item>
</>
)} )}
</Menu> </Menu>
) )