mattermost-mobile/app/components/post_draft/draft_input/index.ts
2025-04-14 22:08:59 +05:30

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));