Signing Page - New Design #152

Merged
eugene merged 29 commits from sigit-info-signing-page into staging 2024-08-20 11:29:11 +00:00
2 changed files with 20 additions and 50 deletions
Showing only changes of commit 1c3d3ca88f - Show all commits

View File

@ -10,7 +10,7 @@ import {
SignStatus SignStatus
} from '../../utils' } from '../../utils'
import { UserAvatar } from '../UserAvatar' import { UserAvatar } from '../UserAvatar'
import { FlatMeta } from '../../hooks/useSigitMeta' import { useSigitMeta } from '../../hooks/useSigitMeta'
import { UserAvatarGroup } from '../UserAvatarGroup' import { UserAvatarGroup } from '../UserAvatarGroup'
import styles from './style.module.scss' import styles from './style.module.scss'
@ -28,31 +28,24 @@ import { useSelector } from 'react-redux'
import { State } from '../../store/rootReducer' import { State } from '../../store/rootReducer'
import { TooltipChild } from '../TooltipChild' import { TooltipChild } from '../TooltipChild'
import { DisplaySigner } from '../DisplaySigner' import { DisplaySigner } from '../DisplaySigner'
import { Meta } from '../../types'
type UsersDetailsProps = Pick< interface UsersDetailsProps {
FlatMeta, meta: Meta
| 'submittedBy' }
| 'signers'
| 'viewers'
| 'fileHashes'
| 'parsedSignatureEvents'
| 'createdAt'
| 'signedStatus'
| 'completedAt'
| 'signersStatus'
>
export const UsersDetails = ({ export const UsersDetails = ({ meta }: UsersDetailsProps) => {
const {
submittedBy, submittedBy,
signers, signers,
viewers, viewers,
fileHashes, fileHashes,
parsedSignatureEvents, signersStatus,
createdAt, createdAt,
signedStatus,
completedAt, completedAt,
signersStatus parsedSignatureEvents,
}: UsersDetailsProps) => { signedStatus
} = useSigitMeta(meta)
const { usersPubkey } = useSelector((state: State) => state.auth) const { usersPubkey } = useSelector((state: State) => state.auth)
const profiles = useSigitProfiles([ const profiles = useSigitProfiles([
...(submittedBy ? [submittedBy] : []), ...(submittedBy ? [submittedBy] : []),

View File

@ -54,19 +54,8 @@ export const VerifyPage = () => {
*/ */
const { uploadedZip, meta } = location.state || {} const { uploadedZip, meta } = location.state || {}
const { const { submittedBy, zipUrl, encryptionKey, signers, viewers, fileHashes } =
submittedBy, useSigitMeta(meta)
zipUrl,
encryptionKey,
signers,
viewers,
fileHashes,
parsedSignatureEvents,
createdAt,
signedStatus,
completedAt,
signersStatus
} = useSigitMeta(meta)
const profiles = useSigitProfiles([ const profiles = useSigitProfiles([
...(submittedBy ? [submittedBy] : []), ...(submittedBy ? [submittedBy] : []),
@ -470,19 +459,7 @@ export const VerifyPage = () => {
</Box> </Box>
</> </>
} }
right={ right={<UsersDetails meta={meta} />}
<UsersDetails
submittedBy={submittedBy}
signers={signers}
viewers={viewers}
fileHashes={fileHashes}
parsedSignatureEvents={parsedSignatureEvents}
createdAt={createdAt}
signedStatus={signedStatus}
completedAt={completedAt}
signersStatus={signersStatus}
/>
}
/> />
)} )}
</Container> </Container>