Template
Initial commit
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// Server-only config for the Frontend Cloud proxy routes.
|
||||
// The API key lives here (read from a non-public env var) so it is never
|
||||
// shipped to the browser bundle.
|
||||
|
||||
export const CLOUD_BASE = "https://cloud.frontend.co";
|
||||
|
||||
export const FRONTEND_API_KEY = process.env.FRONTEND_API_KEY ?? "";
|
||||
@@ -0,0 +1,12 @@
|
||||
import { clsx, type ClassValue } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export function truncate(str: string, maxLength: number): string {
|
||||
if (!str) return '';
|
||||
if (str.length <= maxLength) return str;
|
||||
return str.slice(0, maxLength).trim() + '...';
|
||||
}
|
||||
Reference in New Issue
Block a user