1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 17:26:37 -04:00

finally fix slow typescript compilation!

see https://github.com/stitchesjs/stitches/issues/1038
This commit is contained in:
2022-06-13 06:47:29 -04:00
parent cef74d4e97
commit 1776173cab
22 changed files with 104 additions and 101 deletions

View File

@ -72,7 +72,8 @@ const Projects = ({ repos }: { repos: Repository[] }) => {
export const getStaticProps: GetStaticProps = async () => {
// https://docs.github.com/en/graphql/reference/objects#repository
const { user } = await graphql(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const response: any = await graphql(
`
query ($username: String!, $sort: RepositoryOrderField!, $limit: Int) {
user(login: $username) {
@ -113,7 +114,10 @@ export const getStaticProps: GetStaticProps = async () => {
}
);
const repos: Repository[] = user.repositories.edges.map(({ node: repo }) => ({
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const results: { node: { [key: string]: any } }[] = response.user.repositories.edges;
const repos = results.map<Repository>(({ node: repo }) => ({
name: repo.name,
url: repo.url,
description: repo.description,