(cherry picked from commit f75c50ad2b)
Co-authored-by: Rajat Dabade <rajatdabade1997@gmail.com>
19 lines
632 B
TypeScript
19 lines
632 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {withDatabase, withObservables} from '@nozbe/watermelondb/react';
|
|
|
|
import {observeConfigBooleanValue} from '@queries/servers/system';
|
|
|
|
import DraftInput from './draft_input';
|
|
|
|
import type {WithDatabaseArgs} from '@typings/database/database';
|
|
|
|
const enhanced = withObservables([], ({database}: WithDatabaseArgs) => {
|
|
const scheduledPostsEnabled = observeConfigBooleanValue(database, 'ScheduledPosts');
|
|
return {
|
|
scheduledPostsEnabled,
|
|
};
|
|
});
|
|
|
|
export default withDatabase(enhanced(DraftInput));
|