#5 Repos are now displayed on the webpage - Additional stlying required.

This commit is contained in:
2025-02-09 17:35:54 +00:00
parent 712d7857db
commit 9da13b76d3
6 changed files with 47 additions and 31 deletions

View File

@ -1,12 +1,12 @@
import type { GitRepo } from "../types";
const API_BASE_URL = "https://git.luke-else.co.uk/api/v1";
// const ACCESS_TOKEN = import.meta.env.VITE_GITEA_TOKEN;
export async function fetchRepos(): Promise<GitRepo[]> {
try {
console.log("Fetching repos...");
const response = await fetch(`${API_BASE_URL}/repos/search`, {
const response = await fetch(`${API_BASE_URL}/repos/search?sort=updated&order=desc&limit=12`, {
headers: {
// "Authorization": `token ${ACCESS_TOKEN}`,
"Content-Type": "application/json"

View File

@ -1,8 +1,9 @@
export interface GitRepo {
id: number;
name: string;
full_name: string;
description: string;
language: string;
size: number;
updated_at: Date;
html_url: string;
private: boolean;
fork: boolean;