Skip to content

Commit

Permalink
fix: incorrect transfer list page (#4017)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyifeng authored Mar 18, 2024
1 parent b0bef06 commit a84b1c2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
19 changes: 11 additions & 8 deletions packages/next-common/components/profile/identityTimeline/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,21 @@ export default function ProfileIdentityTimeline() {
const chain = useChain();
const address = useProfileAddress();
const timeline = useIdentityTimeline();
const hasTimeline = timeline && timeline.length > 0;

return (
<SecondaryCard>
<IdentityTimeline timelineData={timeline} />
<div className="flex w-full justify-end mt-[24px]">
<ExternalLink
className="text14Medium text-theme500"
href={`https://${chain}.statescan.io/#/accounts/${address}?sub=identity_timeline&tab=identity`}
>
View More
</ExternalLink>
</div>
{hasTimeline && (
<div className="flex w-full justify-end mt-[24px]">
<ExternalLink
className="text14Medium text-theme500"
href={`https://${chain}.statescan.io/#/accounts/${address}?sub=identity_timeline&tab=identity`}
>
View More
</ExternalLink>
</div>
)}
</SecondaryCard>
);
}
4 changes: 3 additions & 1 deletion packages/next-common/components/profile/transfers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default function ProfileTransfers() {
}

fetch(
`https://${chain}-api.statescan.io/accounts/${address}/transfers?page=${page}&page_size=${DEFAULT_PAGE_SIZE}`,
`https://${chain}-api.statescan.io/accounts/${address}/transfers?page=${
page - 1
}&page_size=${DEFAULT_PAGE_SIZE}`,
)
.then((response) => {
if (!response.ok) {
Expand Down

0 comments on commit a84b1c2

Please sign in to comment.