Fix website build (#3983)

This commit is contained in:
Charles Bochet
2024-02-14 21:28:26 +01:00
committed by GitHub
parent 62058dd0e9
commit 9777c5fbce
9 changed files with 71 additions and 49 deletions

View File

@ -1,19 +1,13 @@
'use client';
import React from 'react';
import styled from '@emotion/styled';
import { IBM_Plex_Mono } from 'next/font/google';
import { ExternalArrow } from '@/app/components/ExternalArrow';
import { GithubIcon } from './Icons';
import { Logo } from './Logo';
const IBMPlexMono = IBM_Plex_Mono({
weight: '500',
subsets: ['latin'],
display: 'swap',
});
const Nav = styled.nav`
display: flex;
flex-direction: row;
@ -59,13 +53,6 @@ const LogoContainer = styled.div`
width: 202px;
`;
const LogoAddon = styled.div`
font-size: 12px;
font-style: normal;
font-weight: 500;
line-height: 150%;
`;
const StyledButton = styled.div`
display: flex;
height: 40px;

View File

@ -1,3 +1,5 @@
export const dynamic = 'force-dynamic';
import { Metadata } from 'next';
import { Background } from '@/app/components/oss-friends/Background';

View File

@ -1,3 +1,6 @@
export const dynamic = 'force-dynamic';
import { global } from '@apollo/client/utilities/globals';
import { graphql } from '@octokit/graphql';
import { insertMany, migrate } from '@/database/database';
@ -86,7 +89,7 @@ interface RepoData {
const query = graphql.defaults({
headers: {
Authorization: 'bearer ' + process.env.GITHUB_TOKEN,
Authorization: 'bearer ' + global.process.env.GITHUB_TOKEN,
},
});
@ -196,6 +199,10 @@ async function fetchAssignableUsers(): Promise<Set<string>> {
}
export async function GET() {
if (!global.process.env.GITHUB_TOKEN) {
return new Response('No GitHub token provided', { status: 500 });
}
await migrate();
// TODO if we ever hit API Rate Limiting
@ -322,5 +329,7 @@ export async function GET() {
}
}
return new Response('Data synced', { status: 200 });
return new Response('Data synced', {
status: 200,
});
}

View File

@ -1,3 +1,5 @@
export const dynamic = 'force-dynamic';
import AvatarGrid from '@/app/components/AvatarGrid';
import { Header } from '@/app/components/developers/contributors/Header';
import { Background } from '@/app/components/oss-friends/Background';