<button
type="submit"
class="btn btn-sm btn-secondary mr-2"
- disabled={this.props.disabled}
+ disabled={this.props.disabled || this.state.loading}
>
{this.state.loading ? (
<svg class="icon icon-spinner spin">
)}
<div class="form-group row">
<div class="col-12">
- <button type="submit" class="btn btn-secondary mr-2">
+ <button
+ type="submit"
+ class="btn btn-secondary mr-2"
+ disabled={this.state.loading}
+ >
{this.state.loading ? (
<svg class="icon icon-spinner spin">
<use xlinkHref="#icon-spinner"></use>
<div class="form-group row">
<div class="col-sm-10">
<button
- disabled={!this.state.postForm.community_id}
+ disabled={
+ !this.state.postForm.community_id || this.state.loading
+ }
type="submit"
class="btn btn-secondary mr-2"
>
)}
<div class="form-group row">
<div class="offset-sm-2 col-sm-10">
- <button type="submit" class="btn btn-secondary mr-2">
+ <button
+ type="submit"
+ class="btn btn-secondary mr-2"
+ disabled={this.state.loading}
+ >
{this.state.loading ? (
<svg class="icon icon-spinner spin">
<use xlinkHref="#icon-spinner"></use>
</div>
<div class="form-group row">
<div class="col-12">
- <button type="submit" class="btn btn-secondary mr-2">
+ <button
+ type="submit"
+ class="btn btn-secondary mr-2"
+ disabled={this.state.loading}
+ >
{this.state.loading ? (
<svg class="icon icon-spinner spin">
<use xlinkHref="#icon-spinner"></use>