diff --git a/apps/portal/app/components/follow/follow-form.tsx b/apps/portal/app/components/follow/follow-form.tsx index 317f7a7a7..c3818b55b 100644 --- a/apps/portal/app/components/follow/follow-form.tsx +++ b/apps/portal/app/components/follow/follow-form.tsx @@ -105,7 +105,7 @@ export default function FollowForm({
'0' ? 'claimFor' : ''}`} + claimPosition={user_assets > '0' ? 'claimFor' : null} />
diff --git a/apps/portal/app/components/list/activity.tsx b/apps/portal/app/components/list/activity.tsx index 06bf6de3f..a48cd3f20 100644 --- a/apps/portal/app/components/list/activity.tsx +++ b/apps/portal/app/components/list/activity.tsx @@ -202,7 +202,7 @@ function ActivityItem({ { if (activity.claim) { navigate(`${PATHS.CLAIM}/${activity.claim.claim_id}`) diff --git a/apps/portal/app/components/list/list-identity-card-portal.tsx b/apps/portal/app/components/list/list-identity-card-portal.tsx index cb8927acb..c10d18a38 100644 --- a/apps/portal/app/components/list/list-identity-card-portal.tsx +++ b/apps/portal/app/components/list/list-identity-card-portal.tsx @@ -3,7 +3,6 @@ import { Button, CurrencyType, Icon, - Identity, Text, TextVariant, TextWeight, @@ -32,7 +31,7 @@ export const ListIdentityCardPortal: React.FC = ({ style={{ height: '18rem' }} > '0' ? 'claimFor' : ''}`} + claimPosition={user_assets > '0' ? 'claimFor' : null} /> diff --git a/apps/portal/app/components/profile/connections-header.tsx b/apps/portal/app/components/profile/connections-header.tsx index 028f2ea1d..9ecbd6a41 100644 --- a/apps/portal/app/components/profile/connections-header.tsx +++ b/apps/portal/app/components/profile/connections-header.tsx @@ -22,7 +22,7 @@ interface ConnectionsHeaderProps { variant: ConnectionsHeaderVariantType subject: IdentityPresenter predicate: IdentityPresenter - object: IdentityPresenter + object: IdentityPresenter | null claim_id: string totalFollowers: number totalStake: string diff --git a/apps/portal/app/components/tags/tags-modal.tsx b/apps/portal/app/components/tags/tags-modal.tsx index c4fe64f68..285a942db 100644 --- a/apps/portal/app/components/tags/tags-modal.tsx +++ b/apps/portal/app/components/tags/tags-modal.tsx @@ -26,6 +26,7 @@ export default function TagsModal({ }} > + {/* @ts-ignore TODO: jp - userWallet is a required prop. Where should it come from? */} { - claimPosition?: ClaimPositionType + claimPosition?: ClaimPositionType | null value: number currency?: CurrencyType } diff --git a/packages/1ui/src/components/ClaimPositionRow/ClaimPositionRow.tsx b/packages/1ui/src/components/ClaimPositionRow/ClaimPositionRow.tsx index 6fa66814d..63c24ca19 100644 --- a/packages/1ui/src/components/ClaimPositionRow/ClaimPositionRow.tsx +++ b/packages/1ui/src/components/ClaimPositionRow/ClaimPositionRow.tsx @@ -29,14 +29,14 @@ interface CommonProps extends React.HTMLAttributes { feesAccrued: number updatedAt?: string tags?: TagWithValueProps[] + claimsForValue?: number + claimsAgainstValue?: number } interface UserVariantProps extends CommonProps { variant: 'user' claimsFor?: number claimsAgainst?: number - claimsForValue?: number - claimsAgainstValue?: number name: string avatarSrc: string walletAddress: string @@ -46,8 +46,6 @@ interface ClaimVariantProps extends CommonProps { variant: 'claim' claimsFor: number claimsAgainst: number - claimsForValue: number - claimsAgainstValue: number name?: never avatarSrc?: never walletAddress?: never diff --git a/packages/1ui/src/components/ClaimRow/ClaimRow.tsx b/packages/1ui/src/components/ClaimRow/ClaimRow.tsx index f69229d43..057f60e01 100644 --- a/packages/1ui/src/components/ClaimRow/ClaimRow.tsx +++ b/packages/1ui/src/components/ClaimRow/ClaimRow.tsx @@ -7,8 +7,8 @@ import { CurrencyType } from 'types' export interface ClaimRowProps extends React.HTMLAttributes { claimsFor: number claimsAgainst: number - claimsForValue: number - claimsAgainstValue: number + claimsForValue?: number + claimsAgainstValue?: number tvl: number currency?: CurrencyType } @@ -17,8 +17,8 @@ const ClaimRow = ({ claimsFor = 0, claimsAgainst = 0, tvl, - claimsForValue, - claimsAgainstValue, + claimsForValue = 0, + claimsAgainstValue = 0, currency, children, className, diff --git a/packages/1ui/src/components/ProfileCard/index.ts b/packages/1ui/src/components/ProfileCard/index.ts index c197ad419..4758facb3 100644 --- a/packages/1ui/src/components/ProfileCard/index.ts +++ b/packages/1ui/src/components/ProfileCard/index.ts @@ -1 +1,2 @@ export * from './ProfileCard' +export * from './components' diff --git a/packages/1ui/src/index.d.ts b/packages/1ui/src/index.d.ts new file mode 100644 index 000000000..e1315d16c --- /dev/null +++ b/packages/1ui/src/index.d.ts @@ -0,0 +1,6 @@ +import './styles/globals.css' + +export * from './styles' +export * from './components' +export * from './utils' +export * from './types' diff --git a/packages/1ui/tsconfig.json b/packages/1ui/tsconfig.json index 1b44854c2..1faf3493a 100644 --- a/packages/1ui/tsconfig.json +++ b/packages/1ui/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { "jsx": "react-jsx", "baseUrl": "./src", - "outDir": "../../dist/packages/1ui" + "outDir": "../../dist/packages/1ui", + "composite": true }, "include": ["src"] }