import type { GithubLanguage, GithubRepository } from "../types/github"; const image = { folder: 'folder.svg', star: 'star.svg', }; function getLanguageColor(language: GithubLanguage) { if (!language) { return; } switch (language.toLowerCase()) { case 'go': return '#a1d5ed'; case 'julia': return '#d35bde'; case 'javascript': return '#e4f060'; case 'typescript': return '#4e85de'; case 'vue': return '#4ede85'; case 'shell': return '#9dde4e'; case 'html': return '#de704e'; default: return '#bab7b6'; } } interface Props { url: string; name: string; description: string; language: string; stars: number; } function Repository(props: Partial) { return (
{ props.description }
{ props.language }
Stargazers
{ props.stars }
); } export default Repository;