Repository: 4ian/GDevelop
File: newIDE/app/src/AssetStore/BehaviorStore/BehaviorStoreContext.js (JavaScript)

Code before:
// @flow
import * as React from 'react';
import { type I18n as I18nType } from '@lingui/core';
import { type FiltersState, useFilters } from '../../UI/Search/FiltersChooser';
import {
  getBehaviorsRegistry,
  type BehaviorsRegistry,
  type BehaviorShortHeader,
} from '../../Utils/GDevelopServices/Extension';
import { type Filters } from '../../Utils/GDevelopServices/Filters';
import {
  useSearchStructuredItem,
  type SearchResult,
} from '../../UI/Search/UseSearchStructuredItem';
import PreferencesContext from '../../MainFrame/Preferences/PreferencesContext';
import { BEHAVIORS_FETCH_TIMEOUT } from '../../Utils/GlobalFetchTimeouts';

const gd: libGDevelop = global.gd;

const emptySearchText = '';

const noExcludedTiers = new Set();
const excludedCommunityTiers = new Set(['community']);

type TranslatedBehaviorShortHeader = {|
  ...BehaviorShortHeader,
  englishFullName: string,
  englishDescription: string,
|};

type BehaviorStoreState = {|
  filters: ?Filters,
  searchResults: ?Array<SearchResult<BehaviorShortHeader>>,
  fetchBehaviors: () => void,
  error: ?Error,
  searchText: string,
  setSearchText: string => void,
  allCategories: string[],
  chosenCategory: string,
  setChosenCategory: string => void,
  setInstalledBehaviorMetadataList: (
    installedBehaviorMetadataList: Array<BehaviorShortHeader>
  ) => void,
  translatedBehaviorShortHeadersByType: {
    [name: string]: TranslatedBehaviorShortHeader,
  },
  filtersState: FiltersState,
|};

Review comment (suggestion):
Should that be:
```suggestion
const excludedExperimentalTiers = new Set(['community', 'experimental']);
```

Code after:
// @flow
import * as React from 'react';
import { type I18n as I18nType } from '@lingui/core';
import { type FiltersState, useFilters } from '../../UI/Search/FiltersChooser';
import {
  getBehaviorsRegistry,
  type BehaviorsRegistry,
  type BehaviorShortHeader,
} from '../../Utils/GDevelopServices/Extension';
import { type Filters } from '../../Utils/GDevelopServices/Filters';
import {
  useSearchStructuredItem,
  type SearchResult,
} from '../../UI/Search/UseSearchStructuredItem';
import PreferencesContext from '../../MainFrame/Preferences/PreferencesContext';
import { BEHAVIORS_FETCH_TIMEOUT } from '../../Utils/GlobalFetchTimeouts';

const gd: libGDevelop = global.gd;

const emptySearchText = '';

const noExcludedTiers = new Set();
const excludedExperimentalTiers = new Set(['experimental']);

type TranslatedBehaviorShortHeader = {|
  ...BehaviorShortHeader,
  englishFullName: string,
  englishDescription: string,
|};

type BehaviorStoreState = {|
  filters: ?Filters,
  searchResults: ?Array<SearchResult<BehaviorShortHeader>>,
  fetchBehaviors: () => void,
  error: ?Error,
  searchText: string,
  setSearchText: string => void,
  allCategories: string[],
  chosenCategory: string,
  setChosenCategory: string => void,
  setInstalledBehaviorMetadataList: (
    installedBehaviorMetadataList: Array<BehaviorShortHeader>
  ) => void,
  translatedBehaviorShortHeadersByType: {
    [name: string]: TranslatedBehaviorShortHeader,
  },
  filtersState: FiltersState,
|};