"use client";
import { useEffect, useState } from "react";
import { motion } from "framer-motion";
import { fadeInUp, fadeInUp2, staggerContainer } from "./effects";
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/selimaj-dev")
.then((r) => {
r.json()
.then((p) => {
setPinned(p);
})
.catch((e) => {
console.error(e);
});
})
.catch((e) => {
console.error(e);
});
}, []);
return (
{pinned &&
pinned.map((repo, i) => (
))}
);
} catch (e: any) {
return {e.toString()}
;
}
}