Show spinner if user id is missing in event tile preview
This commit is contained in:
parent
9d9f590c21
commit
6e30673164
2 changed files with 5 additions and 2 deletions
|
@ -25,6 +25,7 @@ import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import { Layout } from "../../../settings/Layout";
|
import { Layout } from "../../../settings/Layout";
|
||||||
import { UIFeature } from "../../../settings/UIFeature";
|
import { UIFeature } from "../../../settings/UIFeature";
|
||||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||||
|
import InlineSpinner from './InlineSpinner';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
/**
|
/**
|
||||||
|
@ -118,6 +119,8 @@ export default class EventTilePreview extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
|
if (!this.props.userId) return <div style={{ paddingTop: '9px' }}><InlineSpinner /></div>;
|
||||||
|
|
||||||
const event = this.fakeEvent(this.state);
|
const event = this.fakeEvent(this.state);
|
||||||
|
|
||||||
const className = classnames(this.props.className, {
|
const className = classnames(this.props.className, {
|
||||||
|
|
|
@ -92,8 +92,8 @@ export default class AppearanceUserSettingsTab extends React.Component<IProps, I
|
||||||
systemFont: SettingsStore.getValue("systemFont"),
|
systemFont: SettingsStore.getValue("systemFont"),
|
||||||
showAdvanced: false,
|
showAdvanced: false,
|
||||||
layout: SettingsStore.getValue("layout"),
|
layout: SettingsStore.getValue("layout"),
|
||||||
userId: "@erim:fink.fink",
|
userId: null,
|
||||||
displayName: "Erimayas Fink",
|
displayName: null,
|
||||||
avatarUrl: null,
|
avatarUrl: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue