update prop name

This commit is contained in:
Alec Armbruster 2023-06-14 09:39:19 -04:00
parent b076427e8d
commit cd9de0b2e0
No known key found for this signature in database
GPG key ID: 0BE3206ADE0F3B3B
2 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ interface CommunityFormProps {
onCancel?(): any; onCancel?(): any;
onUpsertCommunity(form: CreateCommunity | EditCommunity): void; onUpsertCommunity(form: CreateCommunity | EditCommunity): void;
enableNsfw?: boolean; enableNsfw?: boolean;
isLoading?: boolean; loading?: boolean;
} }
interface CommunityFormState { interface CommunityFormState {
@ -88,7 +88,7 @@ export class CommunityForm extends Component<
<form onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}> <form onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}>
<NavigationPrompt <NavigationPrompt
when={ when={
!this.props.isLoading && !this.props.loading &&
!!( !!(
this.state.form.name || this.state.form.name ||
this.state.form.title || this.state.form.title ||
@ -241,9 +241,9 @@ export class CommunityForm extends Component<
<button <button
type="submit" type="submit"
className="btn btn-secondary mr-2" className="btn btn-secondary mr-2"
disabled={this.props.isLoading} disabled={this.props.loading}
> >
{this.props.isLoading ? ( {this.props.loading ? (
<Spinner /> <Spinner />
) : this.props.community_view ? ( ) : this.props.community_view ? (
capitalizeFirstLetter(i18n.t("save")) capitalizeFirstLetter(i18n.t("save"))

View file

@ -47,7 +47,7 @@ export class CreateCommunity extends Component<any, CreateCommunityState> {
allLanguages={this.state.siteRes.all_languages} allLanguages={this.state.siteRes.all_languages}
siteLanguages={this.state.siteRes.discussion_languages} siteLanguages={this.state.siteRes.discussion_languages}
communityLanguages={this.state.siteRes.discussion_languages} communityLanguages={this.state.siteRes.discussion_languages}
isLoading={this.state.loading} loading={this.state.loading}
/> />
</div> </div>
</div> </div>