Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Commit 583ddd5

Browse files
antoinechalifourjuanpicado
authored andcommitted
fix: some warnings in console (#155)
* fix: remove react emotion selector warning * fix: validate DOM nesting
1 parent 7bd9eb7 commit 583ddd5

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

src/components/DetailSidebar/DetailSidebar.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ import Repository from '../Repository/Repository';
1414

1515
import { DetailContext } from '../../pages/Version';
1616

17-
import { TitleListItem, TitleListItemText } from './styles';
17+
import { TitleListItem, TitleListItemText, PackageDescription, PackageVersion } from './styles';
1818

1919
const renderLatestDescription = (description, version, isLatest: boolean = true): JSX.Element => {
2020
return (
21-
<span>
22-
<div>{description}</div>
23-
{version ? <small>{`${isLatest ? 'Latest v' : 'v'}${version}`}</small> : null}
24-
</span>
21+
<>
22+
<PackageDescription>{description}</PackageDescription>
23+
{version ? (
24+
<PackageVersion>
25+
<small>{`${isLatest ? 'Latest v' : 'v'}${version}`}</small>
26+
</PackageVersion>
27+
) : null}
28+
</>
2529
);
2630
};
2731

src/components/DetailSidebar/styles.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import styled from 'react-emotion';
2-
import Avatar from '@material-ui/core/Avatar';
32
import ListItem from '@material-ui/core/ListItem';
43
import ListItemText from '@material-ui/core/ListItemText';
54

6-
import colors from '../../utils/styles/colors';
7-
85
export const TitleListItem = styled(ListItem)({
96
'&&': {
107
paddingLeft: 0,
@@ -21,10 +18,14 @@ export const TitleListItemText = styled(ListItemText)({
2118
},
2219
});
2320

24-
export const TitleAvatar = styled(Avatar)({
21+
export const PackageDescription = styled('span')({
22+
'&&': {
23+
display: 'block',
24+
},
25+
});
26+
27+
export const PackageVersion = styled('span')({
2528
'&&': {
26-
color: colors.greySuperLight,
27-
backgroundColor: colors.primary,
28-
textTransform: 'capitalize',
29+
display: 'block',
2930
},
3031
});

src/components/Footer/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const Flags = styled('span')`
9090
border-color: ${colors.greyAthens} transparent transparent transparent;
9191
transform: rotate(90deg);
9292
}
93-
${ToolTip}:hover & {
93+
${/* sc-selector */ ToolTip}:hover & {
9494
visibility: visible;
9595
}
9696
}

0 commit comments

Comments
 (0)