From 4e80393ba9e8eaeec7537c2df850a06aed0d7199 Mon Sep 17 00:00:00 2001 From: Daria <2395326+piggydoughnut@users.noreply.github.com> Date: Mon, 30 Sep 2024 19:01:06 +0800 Subject: [PATCH] Reflecting changes to Identity pallet (#10959) * showing discord, github and matrix * restored other attribute for backwards compatibility --- .../src/AccountSidebar/Identity.tsx | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/react-components/src/AccountSidebar/Identity.tsx b/packages/react-components/src/AccountSidebar/Identity.tsx index 9befc10bc1..0bf29b9afa 100644 --- a/packages/react-components/src/AccountSidebar/Identity.tsx +++ b/packages/react-components/src/AccountSidebar/Identity.tsx @@ -1,12 +1,10 @@ // Copyright 2017-2024 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { AddressIdentity } from '@polkadot/react-hooks/types'; - import React, { useMemo } from 'react'; import { useApi, useRegistrars, useSubidentities, useToggle } from '@polkadot/react-hooks'; -import { AddressIdentityOtherDiscordKey } from '@polkadot/react-hooks/types'; +import { type AddressIdentity, AddressIdentityOtherDiscordKey } from '@polkadot/react-hooks/types'; import { isHex } from '@polkadot/util'; import AddressMini from '../AddressMini.js'; @@ -150,6 +148,30 @@ function Identity ({ address, identity }: Props): React.ReactElement | nu )} + {identity.github && ( +
+
{t('github')}
+
+ {identity.github} +
+
+ )} + {identity.matrix && ( +
+
{t('matrix')}
+
+ {identity.matrix} +
+
+ )} + {identity.discord && ( +
+
{t('discord')}
+
+ {identity.discord} +
+
+ )} {identity.riot && (
{t('riot')}