From 412f9ed431ea192bbf68b182845af5f3747614b3 Mon Sep 17 00:00:00 2001 From: Zain Date: Mon, 1 Nov 2021 11:53:35 +0530 Subject: [PATCH] MAdded getter and setter methods for username and credentials --- src/view/App.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/view/App.tsx b/src/view/App.tsx index c49cae7..a36d771 100644 --- a/src/view/App.tsx +++ b/src/view/App.tsx @@ -5,8 +5,20 @@ import Statsview from "./Components/Statsview" import Taskview from "./Components/Taskview" class App extends React.Component { - username = "" - credentials = "" + private _username = ""; + 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) { super(props) this.username = this.props.plugin.settings.userID