diff --git a/components/InfoColumn.tsx b/components/InfoColumn.tsx index aa5ae2f5..dc0a4ea9 100644 --- a/components/InfoColumn.tsx +++ b/components/InfoColumn.tsx @@ -21,7 +21,6 @@ import { useEffect, useState } from "react"; import { format } from "timeago.js"; import InfoColumnItem from "~/components/InfoColumnItem"; import { Link } from "~/components/Link"; -import { BASE_API_URL } from "~/utils/constants"; import { Package, User } from "~/utils/types"; interface Props { @@ -78,24 +77,24 @@ export default function InfoColumn(props: Props): JSX.Element { const { hasCopied, onCopy } = useClipboard(installSnippet); const [owners, setOwners] = useState([]); - useEffect(() => { - fetch(`${BASE_API_URL}/packages/${props.package.name}/owners`) - .then((res) => { - res.json().then((data) => { - const users: User[] = []; - for (const rawUser of data.data) { - users.push({ - id: rawUser.id, - name: rawUser.name, - user_name: rawUser.user_name, - avatar_url: rawUser.avatar_url, - }); - } - setOwners(users); - }); - }) - .catch((err) => console.error(err)); - }, [props.package.name]); + // useEffect(() => { + // fetch(`${BASE_API_URL}/packages/${props.package.name}/owners`) + // .then((res) => { + // res.json().then((data) => { + // const users: User[] = []; + // for (const rawUser of data.data) { + // users.push({ + // id: rawUser.id, + // name: rawUser.name, + // user_name: rawUser.user_name, + // avatar_url: rawUser.avatar_url, + // }); + // } + // setOwners(users); + // }); + // }) + // .catch((err) => console.error(err)); + // }, [props.package.name]); return ( }> diff --git a/package.json b/package.json index ea27f9c3..44f7c757 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "next dev", + "prebuild": "yarn generate", "build": "next build", "postbuild": "next-sitemap", "start": "next start",