diff options
author | Dessalines <tyhou13@gmx.com> | 2020-04-10 16:55:57 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-04-10 16:55:57 -0400 |
commit | bb287cbd076940bd09f6afb61b642370d020f91e (patch) | |
tree | f3fe3afa29b6445fbb2232a8c5a9133b8d691a91 /ui/src/components/site-form.tsx | |
parent | ed264aba3c12243352f68c2de6a5f21f23778bd0 (diff) |
Adding an admin settings page.
- Fixes #620
- Adding a UserListing component. Fixes #627
Diffstat (limited to 'ui/src/components/site-form.tsx')
-rw-r--r-- | ui/src/components/site-form.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/src/components/site-form.tsx b/ui/src/components/site-form.tsx index df913043..f0c80585 100644 --- a/ui/src/components/site-form.tsx +++ b/ui/src/components/site-form.tsx @@ -58,12 +58,19 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> { }); } + // Necessary to stop the loading + componentWillReceiveProps() { + this.state.loading = false; + this.setState(this.state); + } + render() { return ( <> <Prompt when={ !this.state.loading && + !this.props.site && (this.state.siteForm.name || this.state.siteForm.description) } message={i18n.t('block_leaving')} |