-
Notifications
You must be signed in to change notification settings - Fork 33
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 #460 from humanprotocol/develop
Release 20230511
- Loading branch information
Showing
76 changed files
with
2,267 additions
and
401 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
29 changes: 29 additions & 0 deletions
29
packages/apps/escrow-dashboard/src/components/MyHMT/CurrencyInput.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,29 @@ | ||
import { Box, Button, TextField } from '@mui/material'; | ||
import React, { FC } from 'react'; | ||
|
||
type CurrencyInputProps = { | ||
placeholder?: string; | ||
}; | ||
|
||
export const CurrencyInput: FC<CurrencyInputProps> = ({ placeholder }) => { | ||
return ( | ||
<Box sx={{ position: 'relative' }}> | ||
<TextField | ||
fullWidth | ||
helperText="HMT Available: 0.000" | ||
placeholder={placeholder} | ||
/> | ||
<Button | ||
variant="text" | ||
sx={{ | ||
position: 'absolute', | ||
right: '10px', | ||
top: '12px', | ||
color: '#858EC6', | ||
}} | ||
> | ||
MAX | ||
</Button> | ||
</Box> | ||
); | ||
}; |
67 changes: 67 additions & 0 deletions
67
packages/apps/escrow-dashboard/src/components/MyHMT/HMTStatusChart.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,67 @@ | ||
import { Box } from '@mui/material'; | ||
import React, { FC } from 'react'; | ||
import { Pie, PieChart, ResponsiveContainer } from 'recharts'; | ||
import { Container } from '../Cards/Container'; | ||
|
||
const data = [ | ||
{ name: 'Allocated', value: 11, fill: '#f9faff' }, | ||
{ name: 'Locked', value: 29, fill: '#858EC6' }, | ||
{ name: 'Avaliable', value: 48, fill: '#320A8D' }, | ||
]; | ||
|
||
type HMTStatusChartProps = {}; | ||
|
||
export const HMTStatusChart: FC<HMTStatusChartProps> = () => { | ||
return ( | ||
<Container densed> | ||
<Box sx={{ width: '100%', height: '360px' }}> | ||
<ResponsiveContainer> | ||
<PieChart width={730} height={360}> | ||
<Pie | ||
data={data} | ||
dataKey="value" | ||
nameKey="name" | ||
cx="50%" | ||
cy="50%" | ||
outerRadius={120} | ||
label={({ | ||
cx, | ||
cy, | ||
midAngle, | ||
innerRadius, | ||
outerRadius, | ||
value, | ||
index, | ||
}) => { | ||
const RADIAN = Math.PI / 180; | ||
const radius = 50 + innerRadius + (outerRadius - innerRadius); | ||
const x = cx + radius * Math.cos(-midAngle * RADIAN); | ||
const y = Math.min( | ||
cy + radius * Math.sin(-midAngle * RADIAN), | ||
310 | ||
); | ||
return ( | ||
<text | ||
x={x} | ||
y={y} | ||
fill="#320A8D" | ||
textAnchor={x > cx ? 'start' : 'end'} | ||
dominantBaseline="central" | ||
> | ||
<tspan x={x} dy="1em"> | ||
{value}% | ||
</tspan> | ||
<tspan x={x} dy="1em"> | ||
{data[index].name} | ||
</tspan> | ||
</text> | ||
); | ||
}} | ||
labelLine={false} | ||
/> | ||
</PieChart> | ||
</ResponsiveContainer> | ||
</Box> | ||
</Container> | ||
); | ||
}; |
Oops, something went wrong.
d2c6738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
escrow-dashboard – ./packages/apps/escrow-dashboard
escrow-dashboard-git-main-humanprotocol.vercel.app
escrow-dashboard-humanprotocol.vercel.app
dashboard.humanprotocol.org
d2c6738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
faucet-server – ./packages/apps/faucet-server/
faucet-server-humanprotocol.vercel.app
faucet-server.vercel.app
faucet-server-git-main-humanprotocol.vercel.app