Revert "Wi-Fi: Convert to TSX (#8581)"

This reverts commit 2af0ae99c6.
This commit is contained in:
Mia 2022-01-08 12:40:02 -06:00 committed by GitHub
parent 797f8be2f7
commit 8e1c07f08e
2 changed files with 362 additions and 575 deletions

View File

@ -28,7 +28,6 @@ export interface PSElements extends preact.JSX.IntrinsicElements {
spotify: {src: string};
username: {name?: string, class?: string};
psicon: {pokemon: string} | {item: string} | {type: string} | {category: string};
center: {class?: string};
}
export {render};
@ -37,13 +36,3 @@ export type VNode = preact.VNode;
export const h = preact.h;
export const Fragment = preact.Fragment;
export class FormatText extends preact.Component<{isTrusted?: boolean, replaceLinebreaks?: boolean}> {
render() {
const child = this.props.children;
if (typeof child !== 'string') throw new Error(`Invalid props.children type: ${!child ? child : typeof child}`);
return <span dangerouslySetInnerHTML={
{__html: Chat.formatText(child, this.props.isTrusted, this.props.replaceLinebreaks)}
} />;
}
}

File diff suppressed because it is too large Load Diff