Fix React contexts (#12855)

This commit is contained in:
Michael Telatynski
2024-08-01 13:01:05 +01:00
committed by GitHub
parent 9b77279b3e
commit b6addb4118
35 changed files with 99 additions and 107 deletions

View File

@@ -108,6 +108,8 @@ export default class MFileBody extends React.Component<IProps, IState> {
public static contextType = RoomContext;
public context!: React.ContextType<typeof RoomContext>;
public state: IState = {};
public static defaultProps = {
showGenericPlaceholder: true,
};
@@ -117,12 +119,6 @@ export default class MFileBody extends React.Component<IProps, IState> {
private userDidClick = false;
private fileDownloader: FileDownloader = new FileDownloader(() => this.iframe.current);
public constructor(props: IProps) {
super(props);
this.state = {};
}
private getContentUrl(): string | null {
if (this.props.forExport) return null;
const media = mediaFromContent(this.props.mxEvent.getContent());