Show spinner if user id is missing in event tile preview

pull/21833/head
Steffen Kolmer 2021-08-27 19:23:26 +02:00
parent 9d9f590c21
commit 6e30673164
2 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import SettingsStore from "../../../settings/SettingsStore";
import { Layout } from "../../../settings/Layout";
import { UIFeature } from "../../../settings/UIFeature";
import { replaceableComponent } from "../../../utils/replaceableComponent";
import InlineSpinner from './InlineSpinner';
interface IProps {
/**
@ -118,6 +119,8 @@ export default class EventTilePreview extends React.Component<IProps, IState> {
}
public render() {
if (!this.props.userId) return <div style={{ paddingTop: '9px' }}><InlineSpinner /></div>;
const event = this.fakeEvent(this.state);
const className = classnames(this.props.className, {

View File

@ -92,8 +92,8 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
systemFont: SettingsStore.getValue("systemFont"),
showAdvanced: false,
layout: SettingsStore.getValue("layout"),
userId: "@erim:fink.fink",
displayName: "Erimayas Fink",
userId: null,
displayName: null,
avatarUrl: null,
};
}