import { RepoData, getRepos, searchRepos } from "../api/repo.ts"; import { useEffect, useRef, useState } from "preact/hooks"; import { SearchBar } from "../components/SearchBar.tsx"; import { useRelativeTopOppacity } from "../util/hook.ts"; function RepoTag(props: { tag: string }) { const { tag } = props; return ( {tag} ); } function RepoItem(props: RepoData) { const ref = useRef(null); const opacity = useRelativeTopOppacity({elem: ref}); const { name, description, url, author, stars, tags, forks } = props; return (
{author+"/"+name}

{forks} forks

{stars} stars

{description}

{tags.map(tag => ( ))}
); } export default function RepoViewer({repos}: {repos: RepoData[]}) { return (
{repos.length > 0 ? ( ) : (

No results found.

)}
); }