mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-16 20:49:23 +00:00
refactor: only a small tweak
This commit is contained in:
@@ -9,9 +9,7 @@ import { toolGroups } from "@/config/tools";
|
|||||||
import { ToolGroup } from "./tool-group";
|
import { ToolGroup } from "./tool-group";
|
||||||
|
|
||||||
const isGroupedTool = (path: string) =>
|
const isGroupedTool = (path: string) =>
|
||||||
Object.values(toolGroups)
|
Object.values(toolGroups).some(({ href }) => path.startsWith(`${href}/`));
|
||||||
.map(({ href }) => href as string)
|
|
||||||
.some(group => path.startsWith(`${group}/`));
|
|
||||||
|
|
||||||
export function ToolGroups() {
|
export function ToolGroups() {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { clsx, type ClassValue } from "clsx";
|
import { clsx, type ClassValue } from "clsx";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
|
||||||
return twMerge(clsx(inputs));
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user