Skip to content

Commit

Permalink
Fix linting key jsx issue
Browse files Browse the repository at this point in the history
  • Loading branch information
milesthedisch committed Oct 25, 2022
1 parent 429e39c commit cc89f67
Showing 1 changed file with 51 additions and 53 deletions.
104 changes: 51 additions & 53 deletions src/components/UserDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,50 +233,10 @@ function UserDialog(props: SimpleDialogProps) {
<Grid container alignItems="center" spacing={2} sx={{ p: 3 }}>
{props.selectedUser?.totalUnits
? Object.entries(props.selectedUser.totalUnits)
.reverse()
.map((tu) => {
return (
<Grid item xs={6}>
<UserDialogInfo variant="multi">
<Typography
sx={{
fontWeight: "bold",
fontStyle: "bold",
pr: 1,
}}
>
Current Units
</Typography>
<Typography
sx={{
fontWeight: "bold",
fontStyle: "bold",
display: "flex",
alignItems: "center",
alignContent: "center",
}}
>
<Label
color={
tu[0] === fund.toLowerCase()
? "primary"
: "secondary"
}
sx={{ mr: 1 }}
>
{tu[0]?.toUpperCase()}
</Label>
{tu[1]?.toString() || 0}
</Typography>
</UserDialogInfo>
</Grid>
);
})
: ""}
{Array.isArray(productionUnitPrice)
? productionUnitPrice.map((p) => {
.reverse()
.map((tu, i) => {
return (
<Grid item xs={6}>
<Grid key={i} item xs={6}>
<UserDialogInfo variant="multi">
<Typography
sx={{
Expand All @@ -285,7 +245,7 @@ function UserDialog(props: SimpleDialogProps) {
pr: 1,
}}
>
Live Price
Current Units
</Typography>
<Typography
sx={{
Expand All @@ -298,21 +258,61 @@ function UserDialog(props: SimpleDialogProps) {
>
<Label
color={
p.fund === fund.toUpperCase()
tu[0] === fund.toLowerCase()
? "primary"
: "secondary"
}
sx={{ mr: 1 }}
>
{p.fund}
{tu[0]?.toUpperCase()}
</Label>
{p.price?.toString()}
{tu[1]?.toString() || 0}
</Typography>
</UserDialogInfo>
</Grid>
);
})
: ""}
{Array.isArray(productionUnitPrice)
? productionUnitPrice.map((p, i) => {
return (
<Grid key={i} item xs={6}>
<UserDialogInfo variant="multi">
<Typography
sx={{
fontWeight: "bold",
fontStyle: "bold",
pr: 1,
}}
>
Live Price
</Typography>
<Typography
sx={{
fontWeight: "bold",
fontStyle: "bold",
display: "flex",
alignItems: "center",
alignContent: "center",
}}
>
<Label
color={
p.fund === fund.toUpperCase()
? "primary"
: "secondary"
}
sx={{ mr: 1 }}
>
{p.fund}
</Label>
{p.price?.toString()}
</Typography>
</UserDialogInfo>
</Grid>
);
})
: ""}
<Grid item xs={6}>
<UserDialogInfo number={`${fee}%`}>Fee</UserDialogInfo>
</Grid>
Expand All @@ -327,12 +327,10 @@ function UserDialog(props: SimpleDialogProps) {
<Box sx={{ paddingBottom: 2 }}>
<FormControl sx={{ marginRight: 1 }}>
<Select value={fund} onChange={(e) => setFund(e.target.value)}>
<MenuItem value={Object.entries(Fund)[0][0]}>{`${
Object.entries(Fund)[0][0]
}`}</MenuItem>
<MenuItem value={Object.entries(Fund)[1][0]}>{`${
Object.entries(Fund)[1][0]
}`}</MenuItem>
<MenuItem value={Object.entries(Fund)[0][0]}>{`${Object.entries(Fund)[0][0]
}`}</MenuItem>
<MenuItem value={Object.entries(Fund)[1][0]}>{`${Object.entries(Fund)[1][0]
}`}</MenuItem>
</Select>
</FormControl>
<FormControl>
Expand Down

1 comment on commit cc89f67

@vercel
Copy link

@vercel vercel bot commented on cc89f67 Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.