weewoo
This commit is contained in:
13
lib/utils/general.ts
Normal file
13
lib/utils/general.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { clsx, type ClassValue } from "clsx"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
|
||||
export function cn(...inputs: ClassValue[]): string {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
export const getGreeting = () => {
|
||||
const hour = new Date().getHours()
|
||||
if (hour < 12) return "Good morning"
|
||||
if (hour < 18) return "Good afternoon"
|
||||
return "Good evening"
|
||||
}
|
||||
Reference in New Issue
Block a user