3a1e112b86
This PR implements a whole lot of fixes and updates to the website. It adds a release-notes page, terms and conditions page, privacy policy page, while fixing HomeStepper, ProductStepper, and WhyTwentyStepper. 3D models still need to be styled and their sizes need to be fixed.
24 lines
558 B
TypeScript
24 lines
558 B
TypeScript
import axios from 'axios';
|
|
|
|
export async function fetchGithubStarCount(): Promise<number | null> {
|
|
try {
|
|
const headers: Record<string, string> = {
|
|
Accept: 'application/vnd.github+json',
|
|
'X-GitHub-Api-Version': '2022-11-28',
|
|
};
|
|
|
|
if (process.env.GITHUB_TOKEN) {
|
|
headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}`;
|
|
}
|
|
|
|
const response = await axios.get(
|
|
'https://api.github.com/repos/twentyhq/twenty',
|
|
{ headers },
|
|
);
|
|
|
|
return response.data.stargazers_count;
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|