-
Notifications
You must be signed in to change notification settings - Fork 4
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 #234 from hackdays-io/feature/subgraph
Add subgraph for fraction token history
- Loading branch information
Showing
6 changed files
with
170 additions
and
17 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
pkgs/frontend/app/routes/$treeId_.assistcredit-history.tsx
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,38 @@ | ||
import { Box, Heading, List, Text } from "@chakra-ui/react"; | ||
import { useParams } from "@remix-run/react"; | ||
import { useGetTransferFractionTokens } from "hooks/useFractionToken"; | ||
import { FC } from "react"; | ||
import { abbreviateAddress } from "utils/wallet"; | ||
import { StickyNav } from "~/components/StickyNav"; | ||
|
||
const WorkspaceMember: FC = () => { | ||
const { treeId } = useParams(); | ||
|
||
const { data } = useGetTransferFractionTokens({ | ||
where: { | ||
workspaceId: treeId, | ||
}, | ||
}); | ||
|
||
return ( | ||
<> | ||
{/* Members */} | ||
<Box mb={4}> | ||
<Heading pb={4}>Transaction History</Heading> | ||
<List.Root> | ||
{data?.transferFractionTokens.map((token) => ( | ||
<List.Item> | ||
<Text> | ||
{abbreviateAddress(token.from)} → {abbreviateAddress(token.to)}{" "} | ||
: {token.amount} | ||
</Text> | ||
</List.Item> | ||
))} | ||
</List.Root> | ||
</Box> | ||
<StickyNav /> | ||
</> | ||
); | ||
}; | ||
|
||
export default WorkspaceMember; |
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
Oops, something went wrong.