You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shorten publisher address in OG image on published contract page (#5242)
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR enhances the `publishedContractOGImageTemplate` function to conditionally shorten the display of the `publisher` address if it is a valid blockchain address.
### Detailed summary
- Added import for `isAddress` and `shortenAddress` from `thirdweb`.
- Updated the rendering of the `publisher` in the `<h2>` element to check if it is a valid address using `isAddress`.
- If valid, it displays the shortened address using `shortenAddress`; otherwise, it displays the full `publisher` name.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
Copy file name to clipboardExpand all lines: apps/dashboard/src/app/(dashboard)/published-contract/[publisher]/[contract_id]/utils/publishedContractOGImageTemplate.tsx
0 commit comments