'use client';
import { useEffect, useState } from "react";
type PinnedRepo = {
author: string;
name: string;
description: string;
language: string;
stars: number;
forks: number;
href?: string;
};
export function Repo({
name,
description: desc,
language: lang,
stars,
forks,
href,
}: PinnedRepo) {
return (
);
}
export default function PinnedRepos() {
try {
const [pinned, setPinned] = useState([]);
useEffect(() => {
fetch("https://pinned.berrysauce.dev/get/kleo-dev").then(r => {
r.json().then(p => {
setPinned(p);
}).catch(e => {
console.error(e)
})
}).catch(e => {
console.error(e)
})
});
return (
{pinned.map((repo, i) => (
))}
);
} catch (e: any) {
return (
{e.toString()}
);
}
}