Skip to content

Commit b891d31

Browse files
committed
Merge branch 'feat/room-abbreviations' into integration
# Conflicts: # src/app/components/message/RenderBody.tsx
2 parents 6e726a7 + bf9deae commit b891d31

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/app/components/message/RenderBody.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type MouseEventHandler, type ReactNode, useEffect, useState } from 'react';
1+
import { type MouseEventHandler, useEffect, useState } from 'react';
22
import parse, { type HTMLReactParserOptions } from 'html-react-parser';
33
import Linkify from 'linkify-react';
44
import { type Opts } from 'linkifyjs';
@@ -66,9 +66,9 @@ function AbbreviationTerm({ text, definition }: AbbreviationTermProps) {
6666
*/
6767
export function buildAbbrReplaceTextNode(
6868
abbrMap: Map<string, string>
69-
): ((text: string) => ReactNode | undefined) | undefined {
69+
): ((text: string) => JSX.Element | undefined) | undefined {
7070
if (abbrMap.size === 0) return undefined;
71-
return function (text: string) {
71+
return function replaceTextNode(text: string) {
7272
const segments = splitByAbbreviations(text, abbrMap);
7373
if (!segments.some((s) => s.termKey !== undefined)) return undefined;
7474
return (

src/app/plugins/react-custom-html-parser.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export const getReactCustomHtmlParser = (
351351
useAuthentication?: boolean;
352352
nicknames?: Nicknames;
353353
autoplayEmojis?: boolean;
354-
replaceTextNode?: (text: string) => ReactNode | undefined;
354+
replaceTextNode?: (text: string) => JSX.Element | undefined;
355355
}
356356
): HTMLReactParserOptions => {
357357
const { replaceTextNode } = params;

0 commit comments

Comments
 (0)