1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-18 09:06:14 +07:00

fix: some warnings in console (#155)

* fix: remove react emotion selector warning

* fix: validate DOM nesting
This commit is contained in:
Antoine Chalifour
2019-10-04 23:19:50 +02:00
committed by Juan Picado @jotadeveloper
parent 7bd9eb7a07
commit 583ddd555a
3 changed files with 18 additions and 13 deletions

View File

@@ -14,14 +14,18 @@ import Repository from '../Repository/Repository';
import { DetailContext } from '../../pages/Version';
import { TitleListItem, TitleListItemText } from './styles';
import { TitleListItem, TitleListItemText, PackageDescription, PackageVersion } from './styles';
const renderLatestDescription = (description, version, isLatest: boolean = true): JSX.Element => {
return (
<span>
<div>{description}</div>
{version ? <small>{`${isLatest ? 'Latest v' : 'v'}${version}`}</small> : null}
</span>
<>
<PackageDescription>{description}</PackageDescription>
{version ? (
<PackageVersion>
<small>{`${isLatest ? 'Latest v' : 'v'}${version}`}</small>
</PackageVersion>
) : null}
</>
);
};