Styling to match the other tabs a bit closer
Introduces a new component to reduce code duplication
This commit is contained in:
parent
d267f232bc
commit
06a9ab3a70
4 changed files with 88 additions and 118 deletions
|
@ -16,20 +16,11 @@ limitations under the License.
|
|||
|
||||
import React from 'react';
|
||||
import {_t} from "../../../../languageHandler";
|
||||
import MatrixClientPeg from "../../../../MatrixClientPeg";
|
||||
const sdk = require("../../../../index");
|
||||
|
||||
export default class NotificationSettingsTab extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.state = {
|
||||
threepids: [],
|
||||
};
|
||||
}
|
||||
|
||||
async componentWillMount(): void {
|
||||
MatrixClientPeg.get().getThreePids().then(r => this.setState({threepids: r.threepids}));
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -38,7 +29,7 @@ export default class NotificationSettingsTab extends React.Component {
|
|||
<div className="mx_SettingsTab">
|
||||
<div className="mx_SettingsTab_heading">{_t("Notifications")}</div>
|
||||
<div className="mx_SettingsTab_section">
|
||||
<Notifications threepids={this.state.threepids} />
|
||||
<Notifications />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue