Skip to content

Commit

Permalink
chore: fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 committed Apr 18, 2024
1 parent 8f15fbe commit c5203a3
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 17 deletions.
2 changes: 1 addition & 1 deletion _raw/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@
},
"TestnetAssetListContainer": {
"add": "Token",
"addTestnet": "Testnet"
"addTestnet": "Network"
},
"noTestnetAssets": "No Custom Network Assets"
},
Expand Down
2 changes: 1 addition & 1 deletion src/ui/component/PillsSwitch/NetSwitchTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function NetSwitchTabs(props: SwitchTabProps) {
return (
<PillsSwitch
{...props}
className="flex bg-r-neutral-line w-[260px] mx-[auto] my-[0] h-[28px] p-[2px] mb-[14px]"
className="flex bg-r-neutral-line w-[260px] mx-[auto] my-[0] h-[32px] p-[2px] mb-[14px]"
itemClassname={clsx('w-[128px] text-[12px]')}
itemClassnameActive="bg-r-neutral-bg-1"
itemClassnameInActive={clsx(
Expand Down
2 changes: 1 addition & 1 deletion src/ui/component/PillsSwitch/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

.pills-switch__item {
color: var(--r-neutral-body);
font-size: 13px;
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: normal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,14 @@ export const AddCustomTestnetTokenPopup = ({
}}
>
{!chain ? (
<div className="flex items-center bg-r-neutral-card2 rounded-[6px] px-[16px] py-[12px] min-h-[52px] cursor-pointer">
<div
className={clsx(
'flex items-center bg-r-neutral-card2 rounded-[6px]',
'px-[16px] py-[12px] min-h-[52px] cursor-pointer',
'border-[1px] border-transparent',
'hover:border-rabby-blue-default hover:bg-r-blue-light1'
)}
>
<div className="text-r-neutral-title1 text-[15px] leading-[18px]">
{t('page.dashboard.assets.AddTestnetToken.selectChain')}
</div>
Expand All @@ -221,7 +228,14 @@ export const AddCustomTestnetTokenPopup = ({
</div>
</div>
) : (
<div className="flex items-center bg-r-neutral-card2 rounded-[6px] gap-[8px] px-[16px] py-[12px] min-h-[52px] cursor-pointer">
<div
className={clsx(
'flex items-center bg-r-neutral-card2 rounded-[6px]',
'gap-[8px] px-[16px] py-[12px] min-h-[52px] cursor-pointer',
'border-[1px] border-transparent',
'hover:border-rabby-blue-default hover:bg-r-blue-light1'
)}
>
<img
src={chain?.logo}
alt=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const CustomTestnetAssetListContainer: React.FC<Props> = ({
);

if (!isFetched && !search) {
return <TokenListViewSkeleton />;
return <TokenListViewSkeleton isTestnet />;
}

const isNoResults = !list?.length;
Expand Down Expand Up @@ -117,7 +117,7 @@ export const CustomTestnetAssetListContainer: React.FC<Props> = ({
<div
className={clsx(
'text-r-neutral-body text-[13px] leading-[16px] cursor-pointer',
'flex items-center gap-x-[4px]'
'flex items-center gap-x-[4px] justify-center'
)}
onClick={() => {
setIsShowAddTestnetModal(true);
Expand All @@ -141,7 +141,7 @@ export const CustomTestnetAssetListContainer: React.FC<Props> = ({
<div
className={clsx(
'text-r-neutral-body text-[13px] leading-[16px] cursor-pointer',
'flex items-center gap-x-[4px]'
'flex items-center gap-x-[4px] justify-center'
)}
onClick={() => {
setIsShowAddModal(true);
Expand Down
29 changes: 22 additions & 7 deletions src/ui/views/CommonPopup/AssetList/TokenListViewSkeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,33 @@ export const TokenListSkeleton = () => {
);
};

export const TokenListViewSkeleton: React.FC = () => {
export const TokenListViewSkeleton: React.FC<{
isTestnet?: boolean;
}> = ({ isTestnet }) => {
return (
<div className="mt-16">
<div className="flex justify-between">
<div className="flex">
<Skeleton.Input
active
className="bg-r-neutral-card-2 rounded-[6px] w-[160px] h-[32px]"
/>
<Skeleton.Input
active
className="bg-r-neutral-card-2 rounded-[6px] w-[100px] h-[32px]"
className="bg-r-neutral-card-2 rounded-[6px] w-[160px] h-[32px] mr-[auto]"
/>
{isTestnet ? (
<div className="flex gap-[12px] items-center">
<Skeleton.Input
active
className="bg-r-neutral-card-2 rounded-[6px] w-[82px] h-[32px] "
/>
<Skeleton.Input
active
className="bg-r-neutral-card-2 rounded-[6px] w-[82px] h-[32px] "
/>
</div>
) : (
<Skeleton.Input
active
className="bg-r-neutral-card-2 rounded-[6px] w-[100px] h-[32px] "
/>
)}
</div>
<TokenListSkeleton />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/views/NFTView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const TabsStyled = styled(Tabs)`
.ant-tabs-tab {
border-radius: 4px;
color: var(--r-neutral-body, #3e495e);
font-size: 13px;
font-size: 12px;
transition: all 0.3s ease-in-out;
margin: 0 !important;
width: 100px;
height: 24px;
height: 28px;
font-weight: 500;
padding: 0;
text-align: center;
Expand Down

0 comments on commit c5203a3

Please sign in to comment.