fix(core): should use AttachmentViewerView in split view and standalone page (#12323)

Closes: [AF-2564](https://linear.app/affine-design/issue/AF-2564/pdf-split-view-多了-header)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Refactor**
  - Improved code clarity and maintainability with clearer comments and streamlined property usage.
  - Updated the workspace attachment page to use a more context-appropriate attachment viewer component.
- **Style**
  - Minor formatting improvements for better code readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
fundon
2025-05-18 05:47:52 +00:00
parent 820c3fda63
commit 4ecdfb1258
4 changed files with 8 additions and 6 deletions
@@ -1,5 +1,5 @@
import { Skeleton } from '@affine/component';
import { AttachmentViewer } from '@affine/core/blocksuite/attachment-viewer';
import { AttachmentViewerView } from '@affine/core/blocksuite/attachment-viewer';
import { type Doc, DocsService } from '@affine/core/modules/doc';
import { type AttachmentBlockModel } from '@blocksuite/affine/model';
import { FrameworkScope, useLiveData, useService } from '@toeverything/infra';
@@ -71,7 +71,7 @@ export const AttachmentPage = ({
<ViewIcon
icon={model.props.type.endsWith('pdf') ? 'pdf' : 'attachment'}
/>
<AttachmentViewer model={model} />
<AttachmentViewerView model={model} />
</FrameworkScope>
);
}