diff --git a/src/shared/components/home/admin-settings.tsx b/src/shared/components/home/admin-settings.tsx index 284805bf..b98da1f0 100644 --- a/src/shared/components/home/admin-settings.tsx +++ b/src/shared/components/home/admin-settings.tsx @@ -35,7 +35,7 @@ import { SiteForm } from "./site-form"; interface AdminSettingsState { siteRes: GetSiteResponse; siteConfigRes: GetSiteConfigResponse; - siteConfigForm: SaveSiteConfig; + siteConfigHjson: string; loading: boolean; banned: PersonViewSafe[]; siteConfigLoading: boolean; @@ -48,10 +48,7 @@ export class AdminSettings extends Component { private subscription: Subscription; private emptyState: AdminSettingsState = { siteRes: this.isoData.site_res, - siteConfigForm: { - config_hjson: null, - auth: null, - }, + siteConfigHjson: null, siteConfigRes: { config_hjson: null, }, @@ -72,13 +69,11 @@ export class AdminSettings extends Component { // Only fetch the data if coming from another route if (this.isoData.path == this.context.router.route.match.url) { this.state.siteConfigRes = this.isoData.routeData[0]; - this.state.siteConfigForm.config_hjson = - this.state.siteConfigRes.config_hjson; + this.state.siteConfigHjson = this.state.siteConfigRes.config_hjson; this.state.banned = this.isoData.routeData[1].banned; this.state.siteConfigLoading = false; this.state.loading = false; } else { - this.state.siteConfigForm.auth = authField(); WebSocketService.Instance.send( wsClient.getSiteConfig({ auth: authField(), @@ -211,7 +206,7 @@ export class AdminSettings extends Component {