's'调试支付
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "@/i18n/navigation";
|
||||
import toolsData from "../data/tools.json";
|
||||
import type { ToolsCategory } from "@/app/lib/theme-data";
|
||||
|
||||
const categories = toolsData.categories as Array<{
|
||||
icon: string;
|
||||
title: string;
|
||||
color: string;
|
||||
bg: string;
|
||||
text: string;
|
||||
tools: Array<{ name: string; desc: string; href: string }>;
|
||||
}>;
|
||||
type ToolsProps = {
|
||||
data: { categories: ToolsCategory[] };
|
||||
};
|
||||
|
||||
function truncateDesc(desc: string, maxLen = 5) {
|
||||
if (!desc || desc.length <= maxLen) return desc;
|
||||
return desc.slice(0, maxLen) + "...";
|
||||
}
|
||||
|
||||
export default function Tools() {
|
||||
export default function Tools({ data }: ToolsProps) {
|
||||
const categories = data.categories;
|
||||
const { t } = useTranslation("tools");
|
||||
const total = categories.reduce((s, c) => s + c.tools.length, 0);
|
||||
const toolStats = [
|
||||
|
||||
Reference in New Issue
Block a user