-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from Monobladegg/main
add visual and fix link to github
- Loading branch information
Showing
4 changed files
with
100 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { FC } from "react"; | ||
import { useStore } from "@/features/store"; | ||
import { useShallow } from "zustand/react/shallow"; | ||
import Link from "next/link"; | ||
|
||
export interface AssetsItem { | ||
code: string; | ||
issuer: string; | ||
tag: string; | ||
} | ||
|
||
type Props = { | ||
item: AssetsItem; | ||
}; | ||
|
||
const AssetsListItem: FC<Props> = ({ item }) => { | ||
const { net } = useStore( | ||
useShallow((state) => ({ | ||
net: state.net, | ||
})) | ||
); | ||
|
||
return ( | ||
<li style={{ padding: "1em", lineHeight: "1.6", overflow: "hidden" }}> | ||
<div> | ||
<b> | ||
<Link | ||
title={item?.issuer} | ||
aria-label={item?.issuer} | ||
className="account-address" | ||
href={`/${net}/account?id=${item?.issuer}`} | ||
style={{ marginRight: "1em" }} | ||
> | ||
<span className="account-key">{item?.issuer}</span> | ||
</Link> | ||
</b> | ||
<a href="#" className="text-small"> | ||
{item?.code} | ||
</a> | ||
{" "} | ||
{item?.tag ? ( | ||
<a href="#" className="inline-tag"> | ||
#{item?.tag} | ||
</a> | ||
) : ( | ||
<a href="#" className="inline-tag"> | ||
#other | ||
</a> | ||
)} | ||
</div> | ||
</li> | ||
); | ||
}; | ||
|
||
export default AssetsListItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,4 @@ | |
"issuer": "GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V", | ||
"tag": "etf" | ||
} | ||
] | ||
] |