Use globalThis and React.JSX in the browser code. [skip build]
Checks / checks (push) Successful in 2m10s
Trigger cinny-mobile / dispatch (push) Successful in 1s

This commit is contained in:
2026-11-01 09:09:00 +11:00
parent 230ca4fcf0
commit 8a53006ead
5 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ export function AngleSelector({
onChange,
size = 80,
disabled = false,
}: AngleSelectorProps): JSX.Element {
}: AngleSelectorProps): React.JSX.Element {
const containerRef = useRef<HTMLDivElement>(null);
const [isDragging, setIsDragging] = useState(false);
+1 -1
View File
@@ -61,7 +61,7 @@ import {
import { MessageLayout, MessageSpacing } from '../../../state/settings';
import { useMatrixClient } from '../../../hooks/useMatrixClient';
import { useEmojiUsage } from '../../../hooks/useEmojiUsage';
import { emojis } from '../../../plugins/emoji';
import { IEmoji, emojis } from '../../../plugins/emoji';
import * as css from './styles.css';
import { EventReaders } from '../../../components/event-readers';
import { TextViewer } from '../../../components/text-viewer';
+4 -4
View File
@@ -184,7 +184,7 @@ export const renderMatrixMention = (
};
export const factoryRenderLinkifyWithMention = (
mentionRender: (href: string) => JSX.Element | undefined,
mentionRender: (href: string) => React.JSX.Element | undefined,
): OptFn<(ir: IntermediateRepresentation) => any> => {
const render: OptFn<(ir: IntermediateRepresentation) => any> = ({
tagName,
@@ -205,7 +205,7 @@ export const factoryRenderLinkifyWithMention = (
return render;
};
export const scaleSystemEmoji = (text: string): (string | JSX.Element)[] =>
export const scaleSystemEmoji = (text: string): (string | React.JSX.Element)[] =>
findAndReplace(
text,
EMOJI_REG_G,
@@ -231,8 +231,8 @@ export const makeHighlightRegex = (highlights: string[]): RegExp | undefined =>
export const highlightText = (
regex: RegExp,
data: (string | JSX.Element)[],
): (string | JSX.Element)[] =>
data: (string | React.JSX.Element)[],
): (string | React.JSX.Element)[] =>
data.flatMap((text) => {
if (typeof text !== 'string') return text;