Files
mattermost-mobile/app/components/autocomplete/index.ts
2022-11-02 19:35:23 -05:00

20 lines
553 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import withObservables from '@nozbe/with-observables';
import {of as of$} from 'rxjs';
import AppsManager from '@managers/apps_manager';
import Autocomplete from './autocomplete';
type OwnProps = {
serverUrl?: string;
}
const enhanced = withObservables(['serverUrl'], ({serverUrl}: OwnProps) => ({
isAppsEnabled: serverUrl ? AppsManager.observeIsAppsEnabled(serverUrl) : of$(false),
}));
export default enhanced(Autocomplete);