瀏覽代碼

feat: 显示

lushdog@outlook.com 3 周之前
父節點
當前提交
1581ee3bad
共有 1 個文件被更改,包括 24 次插入3 次删除
  1. 24 3
      src/app/my-lp/page.tsx

+ 24 - 3
src/app/my-lp/page.tsx

@@ -47,6 +47,7 @@ interface RecordInfo {
 	priceUpper?: string
 	isInRange?: boolean
 	bonusInfo?: {
+		fromCreatorWallet: string
 		fromCreatorPositionStatus: number
 		fromCreatorPosition: string
 	}
@@ -265,13 +266,27 @@ function MyLPPageContent() {
 		// 	),
 		// },
 		{
-			title: 'Total Deposit',
+			title: 'Liquidity',
 			dataIndex: 'liquidityUsd',
 			key: 'liquidityUsd',
 			render: (text: string) => (
 				<span className="font-mono text-sm">${Number(text).toFixed(2)}</span>
 			),
 		},
+		{
+			title: '上级地址',
+			dataIndex: 'fromCreatorWallet',
+			key: 'fromCreatorWallet',
+			render: (text: string, record: RecordInfo) => (
+				<span className="font-mono text-sm text-blue-500">
+					{record?.bonusInfo?.fromCreatorWallet
+						? record?.bonusInfo?.fromCreatorWallet?.slice(0, 6) +
+							'...' +
+							record?.bonusInfo?.fromCreatorWallet?.slice(-4)
+						: '无上级'}
+				</span>
+			),
+		},
 		{
 			title: 'PNL',
 			dataIndex: 'pnlUsd',
@@ -374,8 +389,14 @@ function MyLPPageContent() {
 						color: dayjs().diff(dayjs(text), 'day') > 0 ? '#2a9d61' : '#FF0000',
 					}}
 				>
-					{dayjs().diff(dayjs(text), 'day')}天
-					{dayjs().diff(dayjs(text), 'hour') % 24}小时
+					{dayjs().diff(dayjs(text), 'day') > 0
+						? dayjs().diff(dayjs(text), 'day') + '天/'
+						: ''}
+					{dayjs().diff(dayjs(text), 'hour') % 24 ||
+					dayjs().diff(dayjs(text), 'day') > 0
+						? (dayjs().diff(dayjs(text), 'hour') % 24) + '小时/'
+						: ''}
+					{dayjs().diff(dayjs(text), 'minute') % 60}分钟
 				</span>
 			),
 		},