summaryrefslogtreecommitdiff
path: root/Settings.jsx
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2021-08-19 23:41:53 +0200
committernea <romangraef@gmail.com>2021-08-19 23:41:53 +0200
commitbb6202dcc3e96a97853a36e65da361c5a32d6dd4 (patch)
tree345127b3da4c8c8d1eb977307087ac9b8fccdb0b /Settings.jsx
parentdc20f2ccb947b5bb2898a9989e8d38c937f97061 (diff)
downloadpowercord-timezone-master.tar.gz
powercord-timezone-master.tar.bz2
powercord-timezone-master.zip
developHEADmaster
Diffstat (limited to 'Settings.jsx')
-rw-r--r--Settings.jsx15
1 files changed, 5 insertions, 10 deletions
diff --git a/Settings.jsx b/Settings.jsx
index b13da96..768cddd 100644
--- a/Settings.jsx
+++ b/Settings.jsx
@@ -1,19 +1,14 @@
const { React } = require('powercord/webpack');
-const {
- Category,
- SwitchItem,
- TextInput,
- RadioGroup,
- SelectInput
-} = require('powercord/components/settings');
+const { SelectInput } = require('powercord/components/settings');
+const { SETTINGS_TIMEZONE } = require('./constants');
const tz = require('./tz');
- module.exports = class Settings extends React.Component {
+module.exports = class Settings extends React.Component {
constructor (props) {
super(props);
this.state = {
- timezone: this.props.getSetting('timezone', 'GMT')
+ timezone: this.props.getSetting(SETTINGS_TIMEZONE, 'GMT')
};
}
@@ -22,7 +17,7 @@ const tz = require('./tz');
<SelectInput
searchable={true}
onChange={(e) => {
- this.props.updateSetting('timezone', e.value);
+ this.props.updateSetting(SETTINGS_TIMEZONE, e.value);
this.setState({ timezone: e.value });
}}
value={this.state.timezone}