diff --git a/public-frontend/src/components/Home.tsx b/public-frontend/src/components/Home.tsx index b3c75be..6969f56 100644 --- a/public-frontend/src/components/Home.tsx +++ b/public-frontend/src/components/Home.tsx @@ -1,10 +1,8 @@ import { useState } from "react"; -import { Search, PlusCircle, ScanBarcode, ShieldCheck, ArrowRight } from "lucide-react"; +import { Search, PlusCircle, ArrowRight } from "lucide-react"; import { api } from "../api"; import type { ProductSummary } from "../types"; -const EXAMPLES = ["可乐", "Nutella", "牛奶", "5449000000996"]; - export default function Home({ onOpen, onContribute, @@ -40,55 +38,46 @@ export default function Home({ return (
-
-
- - 公益 · 开放 · 可溯源 - -

- 天 -

-

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

+

+ 天 +

-
run(undefined, e)} - className="mx-auto mt-7 flex w-full max-w-2xl flex-col gap-2 sm:flex-row" - > -
- - setQ(e.target.value)} - placeholder="例如:可乐、Nutella、5449000000996" - className="flex-1 bg-transparent py-3.5 outline-none" - /> -
- -
- -
- 试试: - {EXAMPLES.map((ex) => ( - - ))} +
run(undefined, e)} + className="mx-auto mt-8 w-full max-w-xl" + > +
+ + setQ(e.target.value)} + placeholder="搜索商品名称或条码" + className="flex-1 bg-transparent outline-none" + />
-
+ {!searched && ( +
+ +
+ )} +
{error && (