1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-19 09:36:30 +07:00

refactor: convert Author component to hooks (#150)

This commit is contained in:
Andrew Hughson
2019-10-06 14:44:48 +01:00
committed by Priscila Oliveira
parent a365ec548a
commit d2f1f1c06a
4 changed files with 51 additions and 79 deletions

View File

@@ -5,7 +5,7 @@ import Grid from '@material-ui/core/Grid';
import HomeIcon from '@material-ui/icons/Home';
import ListItem from '@material-ui/core/ListItem';
import { PackageMetaInterface } from 'types/packageMeta';
import { PackageMetaInterface, Author as PackageAuthor } from 'types/packageMeta';
import Tag from '../Tag';
import fileSizeSI from '../../utils/file-size';
import { formatDate, formatDateDistance } from '../../utils/package';
@@ -28,11 +28,6 @@ import {
WrapperLink,
} from './styles';
import { isURL } from '../../utils/url';
interface Author {
name: string;
avatar?: string;
email?: string;
}
interface Bugs {
url: string;
@@ -45,7 +40,7 @@ export interface PackageInterface {
name: string;
version: string;
time?: number | string;
author: Author;
author: PackageAuthor;
description?: string;
keywords?: string[];
license?: PackageMetaInterface['latest']['license'];