Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add a layout fallback for EventTile
Browse files Browse the repository at this point in the history
  • Loading branch information
germain-gg committed Jul 1, 2021
1 parent 6f62233 commit ede8712
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ interface IProps {
showReactions?: boolean;

// which layout to use
layout?: Layout;
layout: Layout;

This comment has been minimized.

Copy link
@t3chguy

t3chguy Jul 1, 2021

Member

if you're using a defaultProp then this should be optional, as it describes the types of the inputs


// whether or not to show flair at all
enableFlair?: boolean;
Expand Down Expand Up @@ -321,6 +321,7 @@ export default class EventTile extends React.Component<IProps, IState> {
static defaultProps = {
// no-op function because onHeightChanged is optional yet some sub-components assume its existence
onHeightChanged: function() {},
layout: Layout.Group,
};

static contextType = MatrixClientContext;
Expand Down

0 comments on commit ede8712

Please sign in to comment.