fix(verify-page): map item keys

This commit is contained in:
enes 2024-08-21 11:26:17 +02:00
parent 8c974768a8
commit 58f70db7f6

View File

@ -48,6 +48,7 @@ import { TooltipChild } from '../../components/TooltipChild.tsx'
import FileList from '../../components/FileList' import FileList from '../../components/FileList'
import { CurrentUserFile } from '../../types/file.ts' import { CurrentUserFile } from '../../types/file.ts'
import { Mark } from '../../types/mark.ts' import { Mark } from '../../types/mark.ts'
import React from 'react'
interface PdfViewProps { interface PdfViewProps {
files: CurrentUserFile[] files: CurrentUserFile[]
@ -78,11 +79,10 @@ const SlimPdfView = ({
const signatureEvents = Object.keys(parsedSignatureEvents) const signatureEvents = Object.keys(parsedSignatureEvents)
if (!hash) return if (!hash) return
return ( return (
<> <React.Fragment key={filename}>
<div <div
id={filename} id={filename}
ref={(el) => (pdfRefs.current[id] = el)} ref={(el) => (pdfRefs.current[id] = el)}
key={filename}
className={styles.fileWrapper} className={styles.fileWrapper}
> >
{pdfFile.pages.map((page, i) => { {pdfFile.pages.map((page, i) => {
@ -132,7 +132,7 @@ const SlimPdfView = ({
File Separator File Separator
</Divider> </Divider>
)} )}
</> </React.Fragment>
) )
})} })}
</div> </div>