Merge pull request #22533 from overleaf/ar-only-use-history-for-blobs-when-enabled

[web] only use history for blobs when enabled

GitOrigin-RevId: 010983e9b29657d4c594e03945dca5700577bf0a
This commit is contained in:
Brian Gough
2025-01-10 09:05:32 +00:00
committed by Copybot
parent eb1b939f5a
commit 2ce82fabab
22 changed files with 303 additions and 150 deletions
@@ -34,6 +34,7 @@ import {
import { Folder } from '../../../../../types/folder'
import { useReferencesContext } from '@/features/ide-react/context/references-context'
import { usePermissionsContext } from '@/features/ide-react/context/permissions-context'
import { fileUrl } from '@/features/utils/fileUrl'
type DroppedFile = File & {
relativePath?: string
@@ -494,7 +495,7 @@ export const FileTreeActionableProvider: FC = ({ children }) => {
const selectedEntity = findInTree(fileTreeData, selectedEntityId)
if (selectedEntity?.type === 'fileRef') {
return `/project/${projectId}/blob/${selectedEntity.entity.hash}?fallback=${selectedEntityId}`
return fileUrl(projectId, selectedEntityId, selectedEntity.entity.hash)
}
if (selectedEntity?.type === 'doc') {