refactor: remove unnecessary Grid and use Anvil component in list

main
Josue 4 years ago committed by Tsu-ba-me
parent b496e8b847
commit b72dacb61f
  1. 5
      striker-ui/components/Anvils/Anvil.tsx
  2. 5
      striker-ui/components/Anvils/AnvilList.tsx

@ -1,12 +1,11 @@
import { Grid } from '@material-ui/core';
import { BodyText } from '../Text';
const Anvil = ({ anvil }: { anvil: AnvilListItem }): JSX.Element => {
return (
<Grid item xs={12}>
<>
<BodyText text={anvil.anvil_name} />
<BodyText text={anvil.anvil_state || 'State unavailable'} />
</Grid>
</>
);
};

@ -1,8 +1,8 @@
import { makeStyles } from '@material-ui/core/styles';
import { ClassNameMap } from '@material-ui/styles';
import { List, Box, Divider, ListItem } from '@material-ui/core';
import { BodyText } from '../Text';
import { BLUE, PURPLE_OFF, RED_ON, TEXT } from '../../lib/consts/DEFAULT_THEME';
import Anvil from './Anvil';
const useStyles = makeStyles(() => ({
root: {
@ -73,8 +73,7 @@ const AnvilList = ({ list }: { list: AnvilListItem[] }): JSX.Element => {
/>
</Box>
<Box p={1} flexGrow={1} className={classes.anvil}>
<BodyText text={anvil?.anvil_name} />
<BodyText text={anvil?.anvil_state || 'State unavailable'} />
<Anvil anvil={anvil} />
</Box>
</Box>
</ListItem>

Loading…
Cancel
Save