This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { SubstitutionData } from "./types";
|
||||
|
||||
export async function getData(): Promise<SubstitutionData | null> {
|
||||
const apiUrl = process.env.API_URL || 'http://localhost:3000';
|
||||
try {
|
||||
const res = await fetch('http://localhost:3000/versioned/v3', {
|
||||
const res = await fetch(`${apiUrl}/versioned/v3`, {
|
||||
next: { revalidate: 60 },
|
||||
});
|
||||
|
||||
|
||||
@@ -4,3 +4,8 @@ import { twMerge } from "tailwind-merge"
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
export function capitalizeFirstLetter(string: string) {
|
||||
if (!string) return string;
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user