diff --git a/public-frontend/src/components/Home.tsx b/public-frontend/src/components/Home.tsx index efedc05..b3c75be 100644 --- a/public-frontend/src/components/Home.tsx +++ b/public-frontend/src/components/Home.tsx @@ -1,28 +1,10 @@ import { useState } from "react"; -import { Search, PlusCircle, Code2, ScanBarcode, ShieldCheck, ArrowRight } from "lucide-react"; +import { Search, PlusCircle, ScanBarcode, ShieldCheck, ArrowRight } from "lucide-react"; import { api } from "../api"; import type { ProductSummary } from "../types"; const EXAMPLES = ["可乐", "Nutella", "牛奶", "5449000000996"]; -const FEATURES = [ - { - icon: Search, - title: "客观可查", - desc: "按名称或条码检索商品的成分、营养、规格等官方事实。", - }, - { - icon: ShieldCheck, - title: "可溯源", - desc: "每条资料标注数据来源与质量分,公开透明、人人可核。", - }, - { - icon: Code2, - title: "开放 API", - desc: "免鉴权只读 REST 接口,开发者可直接接入商品档案。", - }, -]; - export default function Home({ onOpen, onContribute, @@ -57,23 +39,32 @@ export default function Home({ return (
-
+
-
+
公益 · 开放 · 可溯源 -

+

-

+

输入商品名称或条码,检索客观、可溯源的商品资料。人人可查,人人可贡献。

-
run(undefined, e)} className="mx-auto mt-7 flex max-w-2xl gap-2"> + run(undefined, e)} + className="mx-auto mt-7 flex w-full max-w-2xl flex-col gap-2 sm:flex-row" + >
-
@@ -106,7 +97,7 @@ export default function Home({
)} - {searched ? ( + {searched && (
{total} 条结果 @@ -154,18 +145,6 @@ export default function Home({ )}
- ) : ( -
- {FEATURES.map(({ icon: Icon, title, desc }) => ( -
- - - -

{title}

-

{desc}

-
- ))} -
)}
);