From 503410f60658896a00246c42cfd01fc87a0839f7 Mon Sep 17 00:00:00 2001 From: Thiendekaco Date: Wed, 11 Dec 2024 15:59:47 +0700 Subject: [PATCH 1/4] [Issue-222] [fix] Mythical_game - Account name for account in case account does not have points on the leaderboard yet to display account name --- .../src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx b/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx index 7c1db4b863..c3e5769601 100644 --- a/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx @@ -35,8 +35,12 @@ export const GameAccountListArea = ({ isLoading, leaderboardPersonItems }: Props return []; } + const telegramAccountName = mineAccount.info.firstName && mineAccount.info.lastName + ? `${mineAccount.info.firstName} ${mineAccount.info.lastName}` + : mineAccount.info.telegramUsername; + return [{ - name: mineAccount.info.telegramUsername, + name: telegramAccountName, prefix: '---', point: 0, avatarSrc: mineAccount.info.photoUrl, From ea75ebb85af68abbb10b85406bb423751f9fb86b Mon Sep 17 00:00:00 2001 From: Thiendekaco Date: Thu, 12 Dec 2024 10:18:26 +0700 Subject: [PATCH 2/4] fix: warning key props ui --- .../Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx b/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx index 3ddf5f58d8..7118bd0f2e 100644 --- a/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx @@ -193,7 +193,10 @@ const Component = ({ className, filterItems, handleCancel, handleReset, onConfir {!!options[index + 1] && checkboxContent(options[index + 1], optionLabel as FilterOption, index + 1)} ) - : <> + :
)) }
@@ -234,7 +237,7 @@ export const ToolFiltersModal = styled(Component)(({ theme: { extend '.ant-checkbox-checked.ant-checkbox-checked': { backgroundImage: 'url("/images/mythical/check-selected.png")', backgroundPosition: 'center center', - backgroundSize: '100% 24px', + backgroundSize: '100% 24px' // filter: 'drop-shadow(0.97px 0.97px 0px #000)' }, @@ -438,6 +441,10 @@ export const ToolFiltersModal = styled(Component)(({ theme: { extend '.__footer-button-cancel .__button-background:before': { backgroundColor: token.colorWhite + }, + + '.__empty-component': { + display: 'none' } }; }); From b9e5a533bf4b7f1953325c97efa244dee0b6282e Mon Sep 17 00:00:00 2001 From: Thiendekaco Date: Thu, 12 Dec 2024 15:54:39 +0700 Subject: [PATCH 3/4] [Issue-222] Mythical_game - update case telegram account have only first name or last name --- .../src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx b/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx index c3e5769601..863b14c1c5 100644 --- a/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx @@ -35,8 +35,8 @@ export const GameAccountListArea = ({ isLoading, leaderboardPersonItems }: Props return []; } - const telegramAccountName = mineAccount.info.firstName && mineAccount.info.lastName - ? `${mineAccount.info.firstName} ${mineAccount.info.lastName}` + const telegramAccountName = (mineAccount?.info.firstName || mineAccount?.info.lastName) + ? `${mineAccount?.info.firstName || ''} ${mineAccount?.info.lastName || ''}` : mineAccount.info.telegramUsername; return [{ From 202750ed158c1032e92f1abaf7077af595f41b02 Mon Sep 17 00:00:00 2001 From: Thiendekaco Date: Thu, 12 Dec 2024 16:33:11 +0700 Subject: [PATCH 4/4] [Issue-222] Mythical_game - update case telegram account have only first name or last name #2 --- .../src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx | 9 +-------- .../Popup/Home/LeaderboardTemp/GameAccountListArea.tsx | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx b/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx index 7118bd0f2e..1900033ddd 100644 --- a/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/Cards/ToolFiters/ToolFiltersModal.tsx @@ -193,10 +193,7 @@ const Component = ({ className, filterItems, handleCancel, handleReset, onConfir {!!options[index + 1] && checkboxContent(options[index + 1], optionLabel as FilterOption, index + 1)} ) - :
+ : null )) }
@@ -441,10 +438,6 @@ export const ToolFiltersModal = styled(Component)(({ theme: { extend '.__footer-button-cancel .__button-background:before': { backgroundColor: token.colorWhite - }, - - '.__empty-component': { - display: 'none' } }; }); diff --git a/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx b/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx index 863b14c1c5..adafb9a54f 100644 --- a/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx +++ b/packages/extension-koni-ui/src/Popup/Home/LeaderboardTemp/GameAccountListArea.tsx @@ -36,7 +36,7 @@ export const GameAccountListArea = ({ isLoading, leaderboardPersonItems }: Props } const telegramAccountName = (mineAccount?.info.firstName || mineAccount?.info.lastName) - ? `${mineAccount?.info.firstName || ''} ${mineAccount?.info.lastName || ''}` + ? `${mineAccount?.info.firstName || ''} ${mineAccount?.info.lastName || ''}`.trim() : mineAccount.info.telegramUsername; return [{