Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Sam Heinz
2025-06-29 16:42:27 +10:00
196 changed files with 9713 additions and 4662 deletions
+6 -6
View File
@@ -1,18 +1,18 @@
import { Category } from "./types";
import type { Category } from "./types";
export const fetchCategories = async () => {
export async function fetchCategories() {
const response = await fetch("api/categories");
if (!response.ok) {
throw new Error(`Failed to fetch categories: ${response.statusText}`);
}
const categories: Category[] = await response.json();
return categories;
};
}
export const fetchVersions = async () => {
export async function fetchVersions() {
const response = await fetch(`api/versions`);
if (!response.ok) {
throw new Error(`Failed to fetch versions: ${response.statusText}`);
throw new Error(`Failed to fetch versions: ${response.statusText}`);
}
return response.json();
};
}
+7 -7
View File
@@ -1,4 +1,4 @@
import { AlertColors } from "@/config/siteConfig";
import type { AlertColors } from "@/config/site-config";
export type Script = {
name: string;
@@ -49,18 +49,18 @@ export type Metadata = {
categories: Category[];
};
export interface Version {
export type Version = {
name: string;
slug: string;
}
};
export interface OperatingSystem {
export type OperatingSystem = {
name: string;
versions: Version[];
}
};
export interface AppVersion {
export type AppVersion = {
name: string;
version: string;
date: Date;
}
};
+3 -1
View File
@@ -1,5 +1,7 @@
import { clsx, type ClassValue } from "clsx";
import type { ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
import { clsx } from "clsx";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));