Skip to content

Commit

Permalink
fix: Fix credential select
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Healy committed Jan 28, 2020
1 parent e6a647c commit 6c5f9e9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions examples/react-graphql/client/src/components/Request/Request.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ const Component: React.FC<Props> = ({ sdr, sender, receiver, threadId, close })

useEffect(() => {
checkValidity()

console.log(selected)
}, [selected])

useEffect(() => {
Expand Down Expand Up @@ -158,13 +160,7 @@ const Component: React.FC<Props> = ({ sdr, sender, receiver, threadId, close })
{sdr.map((requestItem: any) => {
console.log(requestItem)
return (
<Box
p={3}
borderBottom={1}
borderColor={'#333333'}
key={requestItem.claimType}
onClick={() => onSelectItem(requestItem.id, requestItem.jwt, requestItem.claimType)}
>
<Box p={3} borderBottom={1} borderColor={'#333333'} key={requestItem.claimType}>
<Box>
<b>{S.String.titleize(requestItem.claimType)}</b>
</Box>
Expand All @@ -173,7 +169,13 @@ const Component: React.FC<Props> = ({ sdr, sender, receiver, threadId, close })
</Box>
<Box pt={3}>
{requestItem.vc.map((credential: any) => {
return <Credential key={credential.hash} {...credential} />
return (
<Credential
key={credential.hash}
{...credential}
onClick={() => onSelectItem(credential.hash, credential.jwt, requestItem.claimType)}
/>
)
})}
{requestItem.vc.length === 0 && (
<Text>
Expand Down

0 comments on commit 6c5f9e9

Please sign in to comment.