mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Merge pull request #6015 from matrix-org/t3chguy/fix/17252
Linkify topics in space room directory results
This commit is contained in:
commit
eea6ba6825
@ -41,6 +41,7 @@ import TextWithTooltip from "../views/elements/TextWithTooltip";
|
|||||||
import {useStateToggle} from "../../hooks/useStateToggle";
|
import {useStateToggle} from "../../hooks/useStateToggle";
|
||||||
import {getOrder} from "../../stores/SpaceStore";
|
import {getOrder} from "../../stores/SpaceStore";
|
||||||
import AccessibleTooltipButton from "../views/elements/AccessibleTooltipButton";
|
import AccessibleTooltipButton from "../views/elements/AccessibleTooltipButton";
|
||||||
|
import {linkifyElement} from "../../HtmlUtils";
|
||||||
|
|
||||||
interface IHierarchyProps {
|
interface IHierarchyProps {
|
||||||
space: Room;
|
space: Room;
|
||||||
@ -172,7 +173,16 @@ const Tile: React.FC<ITileProps> = ({
|
|||||||
{ suggestedSection }
|
{ suggestedSection }
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mx_SpaceRoomDirectory_roomTile_info">
|
<div
|
||||||
|
className="mx_SpaceRoomDirectory_roomTile_info"
|
||||||
|
ref={e => e && linkifyElement(e)}
|
||||||
|
onClick={ev => {
|
||||||
|
// prevent clicks on links from bubbling up to the room tile
|
||||||
|
if ((ev.target as HTMLElement).tagName === "A") {
|
||||||
|
ev.stopPropagation();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
{ description }
|
{ description }
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_SpaceRoomDirectory_actions">
|
<div className="mx_SpaceRoomDirectory_actions">
|
||||||
|
Loading…
Reference in New Issue
Block a user