Skip to content

Commit

Permalink
fix(ui): update the transaction share link querystring to use blockhe…
Browse files Browse the repository at this point in the history
…ight (#1009)

- Updated the share link to use `bh` instead of `tx_id`.
- Added a `max-height` media query to the modal so it fits on small
screens.

![CleanShot 2024-11-06 at 15 05
26](https://github.com/user-attachments/assets/7692002b-696d-4c01-b68c-883d69cda68d)

Co-authored-by: Brian Pearce <[email protected]>
  • Loading branch information
peps and brianp authored Nov 6, 2024
1 parent fc6fe0b commit a85fa67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/containers/ShareRewardModal/ShareRewardModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ export default function ShareRewardModal() {
const block = item?.blockHeight || 0;
const reward = item?.amount || 0;
const earningsFormatted = useMemo(() => formatBalance(reward).toLowerCase(), [reward]);
const tx_id = item?.tx_id || '';

const shareUrl = `${airdropUrl}/download/${referralCode}?tx_id=${tx_id}`;
const shareUrl = `${airdropUrl}/download/${referralCode}?bh=${block}`;

const handleCopy = () => {
navigator.clipboard.writeText(shareUrl);
Expand Down
9 changes: 9 additions & 0 deletions src/containers/ShareRewardModal/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ export const HeroImage = styled('img')`
left: 50%;
transform: translateX(-50%);
pointer-events: none;
@media (max-height: 800px) {
width: 65%;
top: -50px;
}
`;

export const ContentWrapper = styled('div')`
Expand All @@ -19,6 +24,10 @@ export const ContentWrapper = styled('div')`
justify-content: center;
align-items: center;
gap: 20px;
@media (max-height: 800px) {
padding-top: 190px;
}
`;

export const Title = styled('div')`
Expand Down

0 comments on commit a85fa67

Please sign in to comment.