Skip to content

Commit

Permalink
TW-1172 Add ads while activity is loading
Browse files Browse the repository at this point in the history
  • Loading branch information
keshan3262 committed Dec 1, 2023
1 parent cce95e6 commit 9214657
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/app/templates/activity/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export const ActivityComponent: React.FC<Props> = ({ assetSlug }) => {

if (activities.length === 0 && !loading && reachedTheEnd) {
return (
<div className={classNames('mt-4 mb-12', 'flex flex-col items-center justify-center', 'text-gray-500')}>
<div className={classNames('mt-3 mb-12', 'flex flex-col items-center justify-center', 'text-gray-500')}>
<div className="mb-6">
<PartnersPromotion variant={PartnersPromotionVariant.Image} />
</div>

<LayersIcon className="w-16 h-auto mb-2 stroke-current" />

<h3 className="text-sm font-light text-center" style={{ maxWidth: '20rem' }}>
Expand All @@ -52,6 +56,11 @@ export const ActivityComponent: React.FC<Props> = ({ assetSlug }) => {
return (
<div className="w-full max-w-sm mx-auto">
<div className={classNames('my-3 flex flex-col', popup && 'mx-4')}>
{loading && activities.length === 0 && (
<div className="mb-4">
<PartnersPromotion variant={PartnersPromotionVariant.Image} />
</div>
)}
<InfiniteScroll
dataLength={activities.length}
hasMore={reachedTheEnd === false}
Expand Down
6 changes: 5 additions & 1 deletion src/lib/apis/tzkt/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ export const fetchGetAccountOperations = (
quote?: TzktQuoteCurrency[];
'parameter.null'?: boolean;
}
) => fetchGet<TzktOperation[]>(chainId, `/accounts/${accountAddress}/operations`, params);
) =>
fetchGet<TzktOperation[]>(chainId, `/accounts/${accountAddress}/operations`, {
...params,
type: Array.isArray(params.type) ? params.type.join(',') : params.type
});

export const fetchGetOperationsByHash = (
chainId: TzktApiChainId,
Expand Down

0 comments on commit 9214657

Please sign in to comment.