Fix React contexts (#12855)
This commit is contained in:
committed by
GitHub
parent
9b77279b3e
commit
b6addb4118
@@ -42,11 +42,12 @@ interface IState {
|
||||
*/
|
||||
export default class NotificationPanel extends React.PureComponent<IProps, IState> {
|
||||
public static contextType = RoomContext;
|
||||
public context!: React.ContextType<typeof RoomContext>;
|
||||
|
||||
private card = React.createRef<HTMLDivElement>();
|
||||
|
||||
public constructor(props: IProps) {
|
||||
super(props);
|
||||
public constructor(props: IProps, context: React.ContextType<typeof RoomContext>) {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
narrow: false,
|
||||
|
||||
Reference in New Issue
Block a user