Add Sigit ID as a path param #195
@ -24,12 +24,16 @@ import { useSigitMeta } from '../../hooks/useSigitMeta'
|
|||||||
import { extractFileExtensions } from '../../utils/file'
|
import { extractFileExtensions } from '../../utils/file'
|
||||||
|
|
||||||
type SigitProps = {
|
type SigitProps = {
|
||||||
sigitKey: string
|
sigitCreateId: string
|
||||||
meta: Meta
|
meta: Meta
|
||||||
parsedMeta: SigitCardDisplayInfo
|
parsedMeta: SigitCardDisplayInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DisplaySigit = ({ meta, parsedMeta, sigitKey }: SigitProps) => {
|
export const DisplaySigit = ({
|
||||||
|
meta,
|
||||||
|
parsedMeta,
|
||||||
|
sigitCreateId: sigitCreateId
|
||||||
|
}: SigitProps) => {
|
||||||
const { title, createdAt, submittedBy, signers, signedStatus, isValid } =
|
const { title, createdAt, submittedBy, signers, signedStatus, isValid } =
|
||||||
parsedMeta
|
parsedMeta
|
||||||
|
|
||||||
@ -48,7 +52,7 @@ export const DisplaySigit = ({ meta, parsedMeta, sigitKey }: SigitProps) => {
|
|||||||
to={
|
to={
|
||||||
signedStatus === SigitStatus.Complete
|
signedStatus === SigitStatus.Complete
|
||||||
? appPublicRoutes.verify
|
? appPublicRoutes.verify
|
||||||
: `${appPrivateRoutes.sign}/${sigitKey}`
|
: `${appPrivateRoutes.sign}/${sigitCreateId}`
|
||||||
}
|
}
|
||||||
className={styles.insetLink}
|
className={styles.insetLink}
|
||||||
></Link>
|
></Link>
|
||||||
|
@ -257,7 +257,7 @@ export const HomePage = () => {
|
|||||||
.map((key) => (
|
.map((key) => (
|
||||||
<DisplaySigit
|
<DisplaySigit
|
||||||
key={`sigit-${key}`}
|
key={`sigit-${key}`}
|
||||||
sigitKey={key}
|
sigitCreateId={key}
|
||||||
parsedMeta={parsedSigits[key]}
|
parsedMeta={parsedSigits[key]}
|
||||||
meta={sigits[key]}
|
meta={sigits[key]}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user