diff --git a/framework/core/js/src/forum/components/HeaderListItem.tsx b/framework/core/js/src/forum/components/HeaderListItem.tsx index d2ec789b19..8b382673d9 100644 --- a/framework/core/js/src/forum/components/HeaderListItem.tsx +++ b/framework/core/js/src/forum/components/HeaderListItem.tsx @@ -13,7 +13,7 @@ export interface IHeaderListItemAttrs extends ComponentAttrs { content: string; excerpt: string; datetime?: Date; - href: string; + href?: string | null; onclick?: (e: Event) => void; actions?: Mithril.Children; } @@ -22,8 +22,18 @@ export default class HeaderListItem) { const { avatar, icon: iconName, content, excerpt, datetime, href, className, onclick, actions, ...attrs } = vnode.attrs; + const Tag = href ? Link : 'button'; + return ( - + {avatar} @@ -33,7 +43,7 @@ export default class HeaderListItem
{actions}
{excerpt}
- +
); } } diff --git a/framework/core/less/forum/HeaderList.less b/framework/core/less/forum/HeaderList.less index a2585fd261..79adc904c4 100644 --- a/framework/core/less/forum/HeaderList.less +++ b/framework/core/less/forum/HeaderList.less @@ -168,6 +168,7 @@ align-items: baseline; row-gap: 1px; column-gap: 6px; + cursor: pointer; // Prevent outline overflowing parent .add-keyboard-focus-ring-offset(-1px);