diff --git a/examples/react-graphql/client/src/components/Request/Request.tsx b/examples/react-graphql/client/src/components/Request/Request.tsx index cf104abd5..992f725cc 100644 --- a/examples/react-graphql/client/src/components/Request/Request.tsx +++ b/examples/react-graphql/client/src/components/Request/Request.tsx @@ -1,5 +1,6 @@ import React, { useState, useContext, useEffect } from 'react' -import { Box, Heading, Avatar, Text, Radio, Button, Loader } from 'rimble-ui' +import { Box, Heading, Text, Radio, Button, Loader } from 'rimble-ui' +import Avatar from '../../components/Avatar/Avatar' import * as Types from '../../types' import Credential from '../Credential/Credential' import { AppContext } from '../../context/AppProvider' @@ -141,7 +142,7 @@ const Component: React.FC = ({ sdr, sender, receiver, threadId, close }) const isSelected = (jwt: string, claimtype: string): Boolean => { return selected[claimtype] && selected[claimtype].jwt === jwt } - + console.log({ sender }) return ( = ({ sdr, sender, receiver, threadId, close }) flex={1} py={4} > - + {sender.shortId} diff --git a/examples/react-graphql/client/src/gql/queries.ts b/examples/react-graphql/client/src/gql/queries.ts index 2d047505d..d26ad05dd 100644 --- a/examples/react-graphql/client/src/gql/queries.ts +++ b/examples/react-graphql/client/src/gql/queries.ts @@ -8,10 +8,12 @@ export const credential = gql` iss { did shortId + profileImage } sub { did shortId + profileImage } jwt nbf @@ -31,6 +33,7 @@ export const identity = gql` did type shortId + profileImage } } ` @@ -55,6 +58,7 @@ export const managedIdentities = gql` did type shortId + profileImage } } ` @@ -71,6 +75,7 @@ export const queryMessage = gql` did { did shortId + profileImage } url } @@ -133,6 +138,7 @@ export const allMessages = gql` did { did shortId + profileImage } url } diff --git a/examples/react-graphql/client/src/layout/Sidebar.tsx b/examples/react-graphql/client/src/layout/Sidebar.tsx index 00959635b..a2aa32a2d 100644 --- a/examples/react-graphql/client/src/layout/Sidebar.tsx +++ b/examples/react-graphql/client/src/layout/Sidebar.tsx @@ -2,9 +2,12 @@ import React, { useContext } from 'react' import { Box } from 'rimble-ui' import { AppContext } from '../context/AppProvider' import Avatar from '../components/Avatar/Avatar' +import * as queries from '../gql/queries' +import { useQuery } from 'react-apollo' const Component = () => { const [appState] = useContext(AppContext) + const { data } = useQuery(queries.identity, { variables: { did: appState.defaultDid } }) return ( { display={'flex'} flexDirection={'column'} > - + ) diff --git a/examples/react-graphql/client/src/queries.ts b/examples/react-graphql/client/src/queries.ts index df8ecfb39..2c5813718 100644 --- a/examples/react-graphql/client/src/queries.ts +++ b/examples/react-graphql/client/src/queries.ts @@ -42,6 +42,7 @@ export const managedIdentities = gql` did type shortId + profileImage } } ` diff --git a/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx b/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx index 9b4fde92c..566febd96 100644 --- a/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx +++ b/examples/react-graphql/client/src/views/Identity/IdentitiyManager.tsx @@ -2,6 +2,7 @@ import React, { useState, useEffect, useContext } from 'react' import { Flex, Box, Text, Heading, Button, Icon, Table, Field, Input } from 'rimble-ui' import Page from '../../layout/Page' import Panel from '../../components/Panel/Panel' +import Avatar from '../../components/Avatar/Avatar' import { useHistory, useRouteMatch, useParams } from 'react-router-dom' import * as queries from '../../queries' import { useQuery, useMutation } from '@apollo/react-hooks' @@ -51,6 +52,7 @@ const Component = () => { + @@ -59,7 +61,13 @@ const Component = () => { {managedIdentitiesData?.managedIdentities?.map( - (identity: { did: string; type: string; shortId: string; name: string }) => { + (identity: { + did: string + type: string + shortId: string + name: string + profileImage?: string + }) => { return ( { }`} onClick={() => showIdentityDetail(identity.did)} > + diff --git a/examples/react-graphql/server/package-lock.json b/examples/react-graphql/server/package-lock.json index ad855c9bf..0dfe65255 100644 --- a/examples/react-graphql/server/package-lock.json +++ b/examples/react-graphql/server/package-lock.json @@ -306,11 +306,11 @@ } }, "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", + "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -930,9 +930,9 @@ } }, "daf-data-store": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/daf-data-store/-/daf-data-store-1.4.1.tgz", - "integrity": "sha512-/jYuBXRLSPr0hLTMfRiSiKoatut0TBsY4Y3ACMiVWbAPOYk9lBeUfDD8iWbu1yef+are+kCxt0MRnDxUu2OptA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/daf-data-store/-/daf-data-store-1.5.0.tgz", + "integrity": "sha512-CngWn+G4Qd9HIsJAPOOMlNBlkDUbOmmL9+jF2iOHb33JIOiJ9MhSsAgNvofJq0G17EgxHLZ0dD6z4qP/GgZf/g==", "requires": { "blakejs": "^1.1.0", "daf-core": "^1.4.1", @@ -1031,11 +1031,11 @@ } }, "daf-node-sqlite3": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/daf-node-sqlite3/-/daf-node-sqlite3-1.4.1.tgz", - "integrity": "sha512-axijTXIJxjkBF6kPJv2w2+2211zEK8VXzcTsK936DEqQnUo8H0eA9K91uMwfBL8U15idcQSGKqfxcy+HG8RbMw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/daf-node-sqlite3/-/daf-node-sqlite3-1.5.0.tgz", + "integrity": "sha512-g7AdC+pvrofLJueAK+JUUdhxbQtmozbDwa+gp4Xnn3nUyn1Rxh84XW84ssbvLexICjzIgrW8c37k1oYpeP8Njw==", "requires": { - "daf-data-store": "^1.4.1", + "daf-data-store": "^1.5.0", "debug": "^4.1.1", "sqlite3": "^4.1.0" }, @@ -1640,9 +1640,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" }, "fast-json-stable-stringify": { "version": "2.1.0", @@ -2261,12 +2261,13 @@ "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" }, "npm-packlist": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz", - "integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npmlog": {
Avatar DID Type Short ID
+ + {identity.did} {identity.type} {identity.shortId}