]> Untitled Git - lemmy-ui.git/commitdiff
fix: Adds ability to hide language warning
authorSean Spade <skspade@pm.me>
Thu, 8 Jun 2023 23:42:39 +0000 (19:42 -0400)
committerSean Spade <skspade@pm.me>
Fri, 9 Jun 2023 03:36:35 +0000 (23:36 -0400)
src/shared/components/common/language-select.tsx
src/shared/components/community/community-form.tsx

index 372d372ad05eff68ef2d992ef70d7bed263f5af0..a82d6517f818eec5474bdb8408d24ea4a2ce5570 100644 (file)
@@ -16,6 +16,7 @@ interface LanguageSelectProps {
   showSite?: boolean;
   iconVersion?: boolean;
   disabled?: boolean;
+  hideLanguageWarning?: boolean;
 }
 
 export class LanguageSelect extends Component<LanguageSelectProps, any> {
@@ -49,7 +50,7 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
       this.selectBtn
     ) : (
       <div>
-        {this.props.multiple && (
+        {this.props.multiple && !this.props.hideLanguageWarning && (
           <div className="alert alert-warning" role="alert">
             {i18n.t("undetermined_language_warning")}
           </div>
index 372e66a641b947f83bc9b7d0213fba00d6050640..25fd82f3fe0adb485178877db484e82b706f2dbe 100644 (file)
@@ -265,6 +265,7 @@ export class CommunityForm extends Component<
             showSite
             selectedLanguageIds={this.state.form.discussion_languages}
             multiple={true}
+            hideLanguageWarning={true}
             onChange={this.handleDiscussionLanguageChange}
           />
           <div className="form-group row">