-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] feat(core): replace server-side api calls with client-side #231
Conversation
✅ Deploy Preview for defimetascan ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -246,7 +271,6 @@ export async function getServerSideProps( | |||
return { | |||
props: { | |||
data: { | |||
block, | |||
blockTransactions: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get block details from server side and blockTransactions we can get on client side, This is because when we will share url on any platform then we will need block details first (SEO point of view)
}; | ||
}); | ||
|
||
setLatestBlocks(sliced); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we assign this setLatestBlocks
before getting txResults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we can separate loading for txn and blocks? what you think?
}: { | ||
txDetails: TransactionI; | ||
}) { | ||
export default function Transaction() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is for specific txn, i will suggest to keep this server side only
DFC-136 Performance: Improve speed of page redirects
In the current meta.defiscan.live, most of our API calls are done from the server side which is causing initial load to be slow and page switching to be clunky.
|
What this PR does / why we need it:
In the current meta.defiscan.live, most of our API calls are done from the server side which is causing initial load to be slow and page switching to be clunky.
In this PR most API calls have been moved to the client side, this would allow our pages to be rendered right away before calling the APIs
Which issue(s) does this PR fixes?:
Fixes DFC-136, #234
Additional comments?:
This PR is only a rough draft, to compare and see if the site clunkiness will improve. The following are still pending:
/transaction/id
,/block/id
, ...)Developer Checklist: