Releasing new design #161
@ -170,17 +170,23 @@ export const VerifyPage = () => {
|
|||||||
|
|
||||||
const [currentFileHashes, setCurrentFileHashes] = useState<{
|
const [currentFileHashes, setCurrentFileHashes] = useState<{
|
||||||
[key: string]: string | null
|
[key: string]: string | null
|
||||||
}>(fileHashes)
|
}>({})
|
||||||
const [files, setFiles] = useState<{ [filename: string]: PdfFile }>({})
|
const [files, setFiles] = useState<{ [filename: string]: PdfFile }>({})
|
||||||
const [currentFile, setCurrentFile] = useState<CurrentUserFile | null>(null)
|
const [currentFile, setCurrentFile] = useState<CurrentUserFile | null>(null)
|
||||||
|
const [signatureFileHashes, setSignatureFileHashes] = useState<{
|
||||||
|
[key: string]: string
|
||||||
|
}>(fileHashes)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setSignatureFileHashes(fileHashes)
|
||||||
|
}, [fileHashes])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (Object.entries(files).length > 0) {
|
if (Object.entries(files).length > 0) {
|
||||||
const tmp = getCurrentUserFiles(files, fileHashes)
|
const tmp = getCurrentUserFiles(files, fileHashes, signatureFileHashes)
|
||||||
|
|
||||||
setCurrentFile(tmp[0])
|
setCurrentFile(tmp[0])
|
||||||
}
|
}
|
||||||
}, [fileHashes, files])
|
}, [signatureFileHashes, fileHashes, files])
|
||||||
|
|
||||||
const usersPubkey = useSelector((state: State) => state.auth.usersPubkey)
|
const usersPubkey = useSelector((state: State) => state.auth.usersPubkey)
|
||||||
const nostrController = NostrController.getInstance()
|
const nostrController = NostrController.getInstance()
|
||||||
@ -524,7 +530,11 @@ export const VerifyPage = () => {
|
|||||||
<>
|
<>
|
||||||
{currentFile !== null && (
|
{currentFile !== null && (
|
||||||
<FileList
|
<FileList
|
||||||
files={getCurrentUserFiles(files, currentFileHashes)}
|
files={getCurrentUserFiles(
|
||||||
|
files,
|
||||||
|
currentFileHashes,
|
||||||
|
signatureFileHashes
|
||||||
|
)}
|
||||||
currentFile={currentFile}
|
currentFile={currentFile}
|
||||||
setCurrentFile={setCurrentFile}
|
setCurrentFile={setCurrentFile}
|
||||||
handleDownload={handleExport}
|
handleDownload={handleExport}
|
||||||
@ -537,7 +547,11 @@ export const VerifyPage = () => {
|
|||||||
>
|
>
|
||||||
<SlimPdfView
|
<SlimPdfView
|
||||||
currentFile={currentFile}
|
currentFile={currentFile}
|
||||||
files={getCurrentUserFiles(files, currentFileHashes)}
|
files={getCurrentUserFiles(
|
||||||
|
files,
|
||||||
|
currentFileHashes,
|
||||||
|
signatureFileHashes
|
||||||
|
)}
|
||||||
parsedSignatureEvents={parsedSignatureEvents}
|
parsedSignatureEvents={parsedSignatureEvents}
|
||||||
/>
|
/>
|
||||||
</StickySideColumns>
|
</StickySideColumns>
|
||||||
|
Loading…
Reference in New Issue
Block a user