Commit 38031614 authored by tom's avatar tom

refactor list skeleton for account

parent 28f5e7b6
...@@ -17,7 +17,7 @@ import AccountPageDescription from 'ui/shared/AccountPageDescription'; ...@@ -17,7 +17,7 @@ import AccountPageDescription from 'ui/shared/AccountPageDescription';
import DataFetchAlert from 'ui/shared/DataFetchAlert'; import DataFetchAlert from 'ui/shared/DataFetchAlert';
import Page from 'ui/shared/Page/Page'; import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle'; import PageTitle from 'ui/shared/Page/PageTitle';
import SkeletonAccountMobile from 'ui/shared/SkeletonAccountMobile'; import SkeletonListAccount from 'ui/shared/skeletons/SkeletonListAccount';
import SkeletonTable from 'ui/shared/SkeletonTable'; import SkeletonTable from 'ui/shared/SkeletonTable';
const DATA_LIMIT = 3; const DATA_LIMIT = 3;
...@@ -63,7 +63,7 @@ const ApiKeysPage: React.FC = () => { ...@@ -63,7 +63,7 @@ const ApiKeysPage: React.FC = () => {
const content = (() => { const content = (() => {
if (isLoading && !data) { if (isLoading && !data) {
const loader = isMobile ? <SkeletonAccountMobile/> : ( const loader = isMobile ? <SkeletonListAccount/> : (
<> <>
<SkeletonTable columns={ [ '100%', '108px' ] }/> <SkeletonTable columns={ [ '100%', '108px' ] }/>
<Skeleton height="48px" width="156px" marginTop={ 8 }/> <Skeleton height="48px" width="156px" marginTop={ 8 }/>
......
...@@ -16,7 +16,7 @@ import AccountPageDescription from 'ui/shared/AccountPageDescription'; ...@@ -16,7 +16,7 @@ import AccountPageDescription from 'ui/shared/AccountPageDescription';
import DataFetchAlert from 'ui/shared/DataFetchAlert'; import DataFetchAlert from 'ui/shared/DataFetchAlert';
import Page from 'ui/shared/Page/Page'; import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle'; import PageTitle from 'ui/shared/Page/PageTitle';
import SkeletonAccountMobile from 'ui/shared/SkeletonAccountMobile'; import SkeletonListAccount from 'ui/shared/skeletons/SkeletonListAccount';
import SkeletonTable from 'ui/shared/SkeletonTable'; import SkeletonTable from 'ui/shared/SkeletonTable';
const CustomAbiPage: React.FC = () => { const CustomAbiPage: React.FC = () => {
...@@ -60,7 +60,7 @@ const CustomAbiPage: React.FC = () => { ...@@ -60,7 +60,7 @@ const CustomAbiPage: React.FC = () => {
const content = (() => { const content = (() => {
if (isLoading && !data) { if (isLoading && !data) {
const loader = isMobile ? <SkeletonAccountMobile/> : ( const loader = isMobile ? <SkeletonListAccount/> : (
<> <>
<SkeletonTable columns={ [ '100%', '108px' ] }/> <SkeletonTable columns={ [ '100%', '108px' ] }/>
<Skeleton height="44px" width="156px" marginTop={ 8 }/> <Skeleton height="44px" width="156px" marginTop={ 8 }/>
......
...@@ -12,7 +12,7 @@ import AccountPageDescription from 'ui/shared/AccountPageDescription'; ...@@ -12,7 +12,7 @@ import AccountPageDescription from 'ui/shared/AccountPageDescription';
import DataFetchAlert from 'ui/shared/DataFetchAlert'; import DataFetchAlert from 'ui/shared/DataFetchAlert';
import Page from 'ui/shared/Page/Page'; import Page from 'ui/shared/Page/Page';
import PageTitle from 'ui/shared/Page/PageTitle'; import PageTitle from 'ui/shared/Page/PageTitle';
import SkeletonAccountMobile from 'ui/shared/SkeletonAccountMobile'; import SkeletonListAccount from 'ui/shared/skeletons/SkeletonListAccount';
import SkeletonTable from 'ui/shared/SkeletonTable'; import SkeletonTable from 'ui/shared/SkeletonTable';
import AddressModal from 'ui/watchlist/AddressModal/AddressModal'; import AddressModal from 'ui/watchlist/AddressModal/AddressModal';
import DeleteAddressModal from 'ui/watchlist/DeleteAddressModal'; import DeleteAddressModal from 'ui/watchlist/DeleteAddressModal';
...@@ -73,7 +73,7 @@ const WatchList: React.FC = () => { ...@@ -73,7 +73,7 @@ const WatchList: React.FC = () => {
let content; let content;
if (isLoading && !data) { if (isLoading && !data) {
const loader = isMobile ? <SkeletonAccountMobile showFooterSlot/> : ( const loader = isMobile ? <SkeletonListAccount showFooterSlot/> : (
<> <>
<SkeletonTable columns={ [ '70%', '30%', '160px', '108px' ] }/> <SkeletonTable columns={ [ '70%', '30%', '160px', '108px' ] }/>
<Skeleton height="44px" width="156px" marginTop={ 8 }/> <Skeleton height="44px" width="156px" marginTop={ 8 }/>
......
...@@ -9,7 +9,7 @@ import useFetch from 'lib/hooks/useFetch'; ...@@ -9,7 +9,7 @@ import useFetch from 'lib/hooks/useFetch';
import useIsMobile from 'lib/hooks/useIsMobile'; import useIsMobile from 'lib/hooks/useIsMobile';
import AccountPageDescription from 'ui/shared/AccountPageDescription'; import AccountPageDescription from 'ui/shared/AccountPageDescription';
import DataFetchAlert from 'ui/shared/DataFetchAlert'; import DataFetchAlert from 'ui/shared/DataFetchAlert';
import SkeletonAccountMobile from 'ui/shared/SkeletonAccountMobile'; import SkeletonListAccount from 'ui/shared/skeletons/SkeletonListAccount';
import SkeletonTable from 'ui/shared/SkeletonTable'; import SkeletonTable from 'ui/shared/SkeletonTable';
import AddressModal from './AddressModal/AddressModal'; import AddressModal from './AddressModal/AddressModal';
...@@ -57,7 +57,7 @@ const PrivateAddressTags = () => { ...@@ -57,7 +57,7 @@ const PrivateAddressTags = () => {
); );
if (isLoading && !addressTagsData) { if (isLoading && !addressTagsData) {
const loader = isMobile ? <SkeletonAccountMobile/> : ( const loader = isMobile ? <SkeletonListAccount/> : (
<> <>
<SkeletonTable columns={ [ '60%', '40%', '108px' ] }/> <SkeletonTable columns={ [ '60%', '40%', '108px' ] }/>
<Skeleton height="44px" width="156px" marginTop={ 8 }/> <Skeleton height="44px" width="156px" marginTop={ 8 }/>
......
...@@ -9,7 +9,7 @@ import useFetch from 'lib/hooks/useFetch'; ...@@ -9,7 +9,7 @@ import useFetch from 'lib/hooks/useFetch';
import useIsMobile from 'lib/hooks/useIsMobile'; import useIsMobile from 'lib/hooks/useIsMobile';
import AccountPageDescription from 'ui/shared/AccountPageDescription'; import AccountPageDescription from 'ui/shared/AccountPageDescription';
import DataFetchAlert from 'ui/shared/DataFetchAlert'; import DataFetchAlert from 'ui/shared/DataFetchAlert';
import SkeletonAccountMobile from 'ui/shared/SkeletonAccountMobile'; import SkeletonListAccount from 'ui/shared/skeletons/SkeletonListAccount';
import SkeletonTable from 'ui/shared/SkeletonTable'; import SkeletonTable from 'ui/shared/SkeletonTable';
import DeletePrivateTagModal from './DeletePrivateTagModal'; import DeletePrivateTagModal from './DeletePrivateTagModal';
...@@ -60,7 +60,7 @@ const PrivateTransactionTags = () => { ...@@ -60,7 +60,7 @@ const PrivateTransactionTags = () => {
); );
if (isLoading && !transactionTagsData) { if (isLoading && !transactionTagsData) {
const loader = isMobile ? <SkeletonAccountMobile/> : ( const loader = isMobile ? <SkeletonListAccount/> : (
<> <>
<SkeletonTable columns={ [ '75%', '25%', '108px' ] }/> <SkeletonTable columns={ [ '75%', '25%', '108px' ] }/>
<Skeleton height="44px" width="156px" marginTop={ 8 }/> <Skeleton height="44px" width="156px" marginTop={ 8 }/>
......
...@@ -10,7 +10,7 @@ import useIsMobile from 'lib/hooks/useIsMobile'; ...@@ -10,7 +10,7 @@ import useIsMobile from 'lib/hooks/useIsMobile';
import PublicTagListItem from 'ui/publicTags/PublicTagTable/PublicTagListItem'; import PublicTagListItem from 'ui/publicTags/PublicTagTable/PublicTagListItem';
import AccountPageDescription from 'ui/shared/AccountPageDescription'; import AccountPageDescription from 'ui/shared/AccountPageDescription';
import DataFetchAlert from 'ui/shared/DataFetchAlert'; import DataFetchAlert from 'ui/shared/DataFetchAlert';
import SkeletonAccountMobile from 'ui/shared/SkeletonAccountMobile'; import SkeletonListAccount from 'ui/shared/skeletons/SkeletonListAccount';
import SkeletonTable from 'ui/shared/SkeletonTable'; import SkeletonTable from 'ui/shared/SkeletonTable';
import DeletePublicTagModal from './DeletePublicTagModal'; import DeletePublicTagModal from './DeletePublicTagModal';
...@@ -58,7 +58,7 @@ const PublicTagsData = ({ changeToFormScreen, onTagDelete }: Props) => { ...@@ -58,7 +58,7 @@ const PublicTagsData = ({ changeToFormScreen, onTagDelete }: Props) => {
); );
if (isLoading) { if (isLoading) {
const loader = isMobile ? <SkeletonAccountMobile/> : ( const loader = isMobile ? <SkeletonListAccount/> : (
<> <>
<SkeletonTable columns={ [ '50%', '25%', '25%', '108px' ] }/> <SkeletonTable columns={ [ '50%', '25%', '25%', '108px' ] }/>
<Skeleton height="48px" width="270px" marginTop={ 8 }/> <Skeleton height="48px" width="270px" marginTop={ 8 }/>
......
...@@ -5,7 +5,7 @@ interface Props { ...@@ -5,7 +5,7 @@ interface Props {
showFooterSlot?: boolean; showFooterSlot?: boolean;
} }
const SkeletonAccountMobile = ({ showFooterSlot }: Props) => { const SkeletonListAccount = ({ showFooterSlot }: Props) => {
const borderColor = useColorModeValue('blackAlpha.200', 'whiteAlpha.200'); const borderColor = useColorModeValue('blackAlpha.200', 'whiteAlpha.200');
return ( return (
...@@ -18,9 +18,8 @@ const SkeletonAccountMobile = ({ showFooterSlot }: Props) => { ...@@ -18,9 +18,8 @@ const SkeletonAccountMobile = ({ showFooterSlot }: Props) => {
paddingY={ 6 } paddingY={ 6 }
borderTopWidth="1px" borderTopWidth="1px"
borderColor={ borderColor } borderColor={ borderColor }
_first={{ _last={{
borderTopWidth: '0', borderBottomWidth: '0px',
pt: '0',
}} }}
> >
<Flex columnGap={ 2 } w="100%" alignItems="center"> <Flex columnGap={ 2 } w="100%" alignItems="center">
...@@ -45,4 +44,4 @@ const SkeletonAccountMobile = ({ showFooterSlot }: Props) => { ...@@ -45,4 +44,4 @@ const SkeletonAccountMobile = ({ showFooterSlot }: Props) => {
); );
}; };
export default SkeletonAccountMobile; export default SkeletonListAccount;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment