Browse Source

pioneer: joy-roles remove unused elements from elements.tsx

Mokhtar Naamani 4 years ago
parent
commit
3e604de951
1 changed files with 2 additions and 51 deletions
  1. 2 51
      pioneer/packages/joy-roles/src/elements.tsx

+ 2 - 51
pioneer/packages/joy-roles/src/elements.tsx

@@ -1,15 +1,14 @@
 import React, { useEffect, useState } from 'react';
 import moment from 'moment';
-import { Header, Card, Icon, Image, Label, Statistic } from 'semantic-ui-react';
+import { Card, Icon, Image, Label, Statistic } from 'semantic-ui-react';
 import { Link } from 'react-router-dom';
 
 import { Balance } from '@polkadot/types/interfaces';
 import { formatBalance } from '@polkadot/util';
 import Identicon from '@polkadot/react-identicon';
 import { IProfile, MemberId } from '@joystream/types/members';
-import { Text, GenericAccountId } from '@polkadot/types';
+import { GenericAccountId } from '@polkadot/types';
 import { LeadRoleState } from '@joystream/types/content-working-group';
-import { Worker } from '@joystream/types/working-group';
 
 type BalanceProps = {
   balance?: Balance;
@@ -23,23 +22,6 @@ export function BalanceView (props: BalanceProps) {
   );
 }
 
-type MemoProps = ProfileProps & {
-  memo?: Text;
-}
-
-export function MemoView (props: MemoProps) {
-  if (typeof props.memo === 'undefined') {
-    return null;
-  }
-
-  return (
-    <div className="memo">
-      <span>Memo:</span> {props.memo.toString()}
-      <Link to={`/addressbook/memo/${props.profile.controller_account.toString()}`}>{' view full memo'}</Link>
-    </div>
-  );
-}
-
 type ProfileProps = {
   profile: IProfile;
 }
@@ -54,37 +36,6 @@ export function HandleView (props: ProfileProps) {
   );
 }
 
-type MemberProps = BalanceProps & ProfileProps
-
-export function MemberView (props: MemberProps) {
-  let avatar = <Identicon value={props.profile.controller_account.toString()} size={50} />;
-  if (typeof props.profile.avatar_uri !== 'undefined' && props.profile.avatar_uri.toString() !== '') {
-    avatar = <Image src={props.profile.avatar_uri.toString()} circular className='avatar' />;
-  }
-
-  return (
-    <Header as='h4' image>
-      {avatar}
-      <Header.Content>
-        <HandleView profile={props.profile} />
-        <BalanceView balance={props.balance} />
-      </Header.Content>
-    </Header>
-  );
-}
-
-type WorkerDetailsProps = MemoProps & BalanceProps & {
-  worker: Worker;
-}
-
-export function WorkerDetailsView (props: WorkerDetailsProps) {
-  return (
-    <div id={props.worker.role_account.toString()}>
-      {props.worker.role_account.toString()}
-    </div>
-  );
-}
-
 export type GroupMember = {
   memberId: MemberId;
   roleAccount: GenericAccountId;