chat-indic-ui / src /lib /utils.ts
sam2ai's picture
Synced repo using 'sync_with_huggingface' Github Action
0971cc4 verified
raw
history blame contribute delete
449 Bytes
import { useEffect, useState } from "react";
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? "";
export function useHasMounted() {
const [hasMounted, setHasMounted] = useState(false);
useEffect(() => {
setHasMounted(true);
}, []);
return hasMounted;
}