Commit 50af773
authored
feat/improve T22 account page (#534)
## Description
This PR displays `Token Extensions` for other accounts.
## Type of change
- [x] New feature
## Screenshots
<img width="732" alt="image"
src="https://github.com/user-attachments/assets/44de309c-f2cf-43f9-9f29-19391be764e5"
/>
<img width="739" alt="image"
src="https://github.com/user-attachments/assets/d24eacd5-2715-4683-9667-6c2c8808f2cc"
/>
## Testing
`pnpm dev` > Visit links below
Token Account:
http://localhost:3000/address/7owTEfBdJ2nEdxaUZ2Hm6XevkG7FqHgmeVhkZbUTCCQT/token-extensions
Multisig Account:
http://localhost:3000/address/FtrZqgM9begkaLHq3f4hGEUrAK1jjJpkc8hZ1hVk3EDN/token-extensions
## Related Issues
Relates to: #516
## Checklist
- [x] My code follows the project's style guidelines
- [x] I have added tests that prove my fix/feature works
- [x] All tests pass locally and in CI
- [x] CI/CD checks pass
- [x] I have included screenshots for protocol screens (if applicable)
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Add feature to display token extensions for accounts, handling
different account types and rendering logic in `page-client.tsx` and
`TokenExtensionsCard.tsx`.
>
> - **Behavior**:
> - Displays `Token Extensions` for accounts in `page-client.tsx` using
`TokenExtensionsCard`.
> - Handles `mint` and `account` types, rendering `TokenExtensionsCard`
if extensions exist, otherwise shows `NoResults`.
> - Uses `ErrorBoundary` to handle errors in
`TokenExtensionsEntriesPageClient`.
> - **Components**:
> - `TokenExtensionsCard` in `TokenExtensionsCard.tsx` now fetches token
info and displays extensions using `TokenExtensionsSection`.
> - Introduces `populateTokenExtensions()` to parse and sort extensions.
> - **Misc**:
> - Removes unused `epoch` variable in `TokenAccountSection.tsx`.
> - Updates `TokenExtensionsPage` in `page.tsx` to use
`TokenExtensionsEntriesPageClient`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=solana-foundation%2Fexplorer&utm_source=github&utm_medium=referral)<sup>
for f41dd7e. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->1 parent e8c6ead commit 50af773
File tree
4 files changed
+75
-22
lines changed- app
- address/[address]/token-extensions
- components/account
4 files changed
+75
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 6 | + | |
12 | 7 | | |
13 | 8 | | |
14 | 9 | | |
| |||
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | | - | |
21 | | - | |
| 15 | + | |
| 16 | + | |
22 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
| 403 | + | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
| |||
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | 515 | | |
520 | 516 | | |
521 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | | - | |
25 | 31 | | |
26 | | - | |
| 32 | + | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
29 | 35 | | |
30 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
31 | 42 | | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
35 | 46 | | |
36 | 47 | | |
37 | | - | |
38 | | - | |
| 48 | + | |
| 49 | + | |
39 | 50 | | |
40 | | - | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| |||
0 commit comments