-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added refreshing when deleting/adding grants
- Loading branch information
Showing
7 changed files
with
103 additions
and
44 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
deploy-web/src/components/settings/AllowanceGrantedRow.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,33 @@ | ||
import React, { ReactNode } from "react"; | ||
import { TableCell } from "@mui/material"; | ||
import { CustomTableRow } from "../shared/CustomTable"; | ||
import { Address } from "../shared/Address"; | ||
import { FormattedTime } from "react-intl"; | ||
import { AllowanceType } from "@src/types/grant"; | ||
import { AKTAmount } from "../shared/AKTAmount"; | ||
import { coinToUDenom } from "@src/utils/priceUtils"; | ||
import { getAllowanceTitleByType } from "@src/utils/grants"; | ||
|
||
type Props = { | ||
allowance: AllowanceType; | ||
children?: ReactNode; | ||
}; | ||
|
||
export const AllowanceGrantedRow: React.FunctionComponent<Props> = ({ allowance }) => { | ||
// const denomData = useDenomData(grant.authorization.spend_limit.denom); | ||
|
||
return ( | ||
<CustomTableRow> | ||
<TableCell>{getAllowanceTitleByType(allowance)}</TableCell> | ||
<TableCell> | ||
<Address address={allowance.granter} isCopyable /> | ||
</TableCell> | ||
<TableCell> | ||
<AKTAmount uakt={coinToUDenom(allowance.allowance.spend_limit[0])} /> AKT | ||
</TableCell> | ||
<TableCell align="right"> | ||
<FormattedTime year="numeric" month={"numeric"} day={"numeric"} value={allowance.allowance.expiration} /> | ||
</TableCell> | ||
</CustomTableRow> | ||
); | ||
}; |
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
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