[Chat] Fix navigation stacking on messages links in split view (#10741)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -481,6 +481,9 @@ function BaseChatItem({
|
||||
|
||||
<Link
|
||||
to={`/messages/${convo.view.id}`}
|
||||
// In split view, this list stays mounted alongside the open convo,
|
||||
// so push would stack duplicate routes on repeated clicks.
|
||||
action={isWithinSplitView ? 'navigate' : 'push'}
|
||||
label={title}
|
||||
accessibilityHint={accessibilityHint}
|
||||
accessibilityActions={
|
||||
|
||||
@@ -11,10 +11,12 @@ export function InboxRequests({
|
||||
count,
|
||||
more,
|
||||
variant,
|
||||
action,
|
||||
}: {
|
||||
count: number
|
||||
more: boolean
|
||||
variant?: 'ghost' | 'solid'
|
||||
action?: 'push' | 'navigate'
|
||||
}) {
|
||||
const {t: l} = useLingui()
|
||||
|
||||
@@ -41,6 +43,7 @@ export function InboxRequests({
|
||||
<Link
|
||||
label={label}
|
||||
to="/messages/inbox"
|
||||
action={action}
|
||||
size="small"
|
||||
variant={unread ? 'solid' : 'ghost'}
|
||||
color={unread ? 'primary_subtle' : 'secondary'}
|
||||
@@ -66,6 +69,7 @@ export function InboxRequests({
|
||||
<Link
|
||||
label={label}
|
||||
to="/messages/inbox"
|
||||
action={action}
|
||||
color={unread ? 'primary_subtle' : 'secondary'}
|
||||
size="small">
|
||||
<ButtonIcon icon={InboxIcon} />
|
||||
|
||||
Reference in New Issue
Block a user