mattermost-mobile/app/components/post_draft/draft_input/index.ts
Mattermost Build bd89c7811c
Feature schedule posts (#8509) (#8775)
(cherry picked from commit f75c50ad2b)

Co-authored-by: Rajat Dabade <rajatdabade1997@gmail.com>
2025-04-15 08:04:39 +03:00

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