refactor: only a small tweak

This commit is contained in:
rusconn
2023-06-24 18:26:26 +09:00
parent b904f2e71e
commit 8d658855ac
2 changed files with 2 additions and 6 deletions

View File

@@ -9,9 +9,7 @@ import { toolGroups } from "@/config/tools";
import { ToolGroup } from "./tool-group";
const isGroupedTool = (path: string) =>
Object.values(toolGroups)
.map(({ href }) => href as string)
.some(group => path.startsWith(`${group}/`));
Object.values(toolGroups).some(({ href }) => path.startsWith(`${href}/`));
export function ToolGroups() {
const pathname = usePathname();