MAdded getter and setter methods for username and credentials

This commit is contained in:
Zain 2021-11-01 11:53:35 +05:30
parent e0f400b761
commit 412f9ed431
No known key found for this signature in database
GPG key ID: 84AD8F072D45C37F

View file

@ -5,8 +5,20 @@ import Statsview from "./Components/Statsview"
import Taskview from "./Components/Taskview" import Taskview from "./Components/Taskview"
class App extends React.Component<any,any> { class App extends React.Component<any,any> {
username = "" private _username = "";
credentials = "" public get username() {
return this._username;
}
public set username(value) {
this._username = value;
}
private _credentials = "";
public get credentials() {
return this._credentials;
}
public set credentials(value) {
this._credentials = value;
}
constructor(props: any) { constructor(props: any) {
super(props) super(props)
this.username = this.props.plugin.settings.userID this.username = this.props.plugin.settings.userID