mattermost-mobile/app/screens/pdf_viewer/index.ts
2025-06-19 15:30:56 +08:00

22 lines
724 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 {observeAllowPdfLinkNavigation} from '@queries/servers/security';
import {observeConfigValue} from '@queries/servers/system';
import PdfViewer from './pdf_viewer';
import type {WithDatabaseArgs} from '@typings/database/database';
type Props = WithDatabaseArgs & {
fileId: string;
}
const enhance = withObservables([], ({database}: Props) => ({
siteURL: observeConfigValue(database, 'SiteURL'),
allowPdfLinkNavigation: observeAllowPdfLinkNavigation(database),
}));
export default withDatabase(enhance(PdfViewer));