mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
chore(utils): remove unused utility functions
- Remove getPath function (moved to problem-editor store) - Remove getDifficultyColorClass function (unused) - Keep only core cn utility function
This commit is contained in:
parent
bcdd72317c
commit
33930e7a33
@ -1,27 +1,6 @@
|
|||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
import { clsx, type ClassValue } from "clsx";
|
import { clsx, type ClassValue } from "clsx";
|
||||||
import type { EditorLanguageConfig, Difficulty } from "@/generated/client";
|
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export function cn(...inputs: ClassValue[]) {
|
||||||
return twMerge(clsx(inputs));
|
return twMerge(clsx(inputs));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPath(
|
|
||||||
problemId: string,
|
|
||||||
editorLanguageConfig: EditorLanguageConfig
|
|
||||||
) {
|
|
||||||
return `file:///${problemId}/${editorLanguageConfig.fileName}${editorLanguageConfig.fileExtension}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getDifficultyColorClass = (difficulty: Difficulty) => {
|
|
||||||
switch (difficulty) {
|
|
||||||
case "EASY":
|
|
||||||
return "text-green-500";
|
|
||||||
case "MEDIUM":
|
|
||||||
return "text-yellow-500";
|
|
||||||
case "HARD":
|
|
||||||
return "text-red-500";
|
|
||||||
default:
|
|
||||||
return "text-gray-500";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
Loading…
Reference in New Issue
Block a user