sandbox data route + cosmetic changes

This commit is contained in:
Ishaan Dey
2024-04-27 00:28:00 -04:00
parent 39696128db
commit 1b6bd01989
5 changed files with 42 additions and 8 deletions

View File

@ -4,3 +4,13 @@ import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
export function processFileType(file: string) {
const ending = file.split(".").pop()
if (ending === "ts" || ending === "tsx") return "typescript"
if (ending === "js" || ending === "jsx") return "javascript"
if (ending) return ending
return "plaintext"
}