Skip to content

Commit

Permalink
update with page optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
LiAohua authored and LiAohua committed Oct 14, 2023
1 parent fb2fc4f commit ab29358
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 91 deletions.
14 changes: 7 additions & 7 deletions packages/nextjs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export const menuLinks: HeaderMenuLink[] = [
// href: "/example-ui",
// icon: <SparklesIcon className="h-4 w-4" />,
// },
{
label: "ETH-SPACE",
href: "/",
icon: <SparklesIcon className="h-4 w-4" />,
},
// {
// label: "ETH-SPACE",
// href: "/",
// icon: <SparklesIcon className="h-4 w-4" />,
// },
// {
// label: "Block Explorer",
// href: "/blockexplorer",
Expand Down Expand Up @@ -106,8 +106,8 @@ export const Header = () => {
<Image alt="SE2 logo" className="cursor-pointer" fill src="/logo.svg" />
</div>
<div className="flex flex-col">
<span className="font-bold leading-tight">Scaffold-ETH</span>
<span className="text-xs">Ethereum dev stack</span>
<span className="font-bold leading-tight">AI-based Smart Contract Explorer</span>
<span className="text-xs">Search Smart Contracts in smarter way</span>
</div>
</Link>
<ul className="hidden lg:flex lg:flex-nowrap menu menu-horizontal px-1 gap-2">
Expand Down
13 changes: 9 additions & 4 deletions packages/nextjs/pages/eth-space.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ETHSpace: NextPage = () => {

//从后端获取数据集列表
const fetchOptions = () => {
return ['eth-whitepaper', 'eth-contracts'];
return ['eth-smart-contracts', 'eth-smart-contracts-sliced', "eth-smart-contracts-analysis"];
};
//获取search prompt与dataset名字后向后端发request
const handleonClick =()=>{
Expand Down Expand Up @@ -50,6 +50,7 @@ const ETHSpace: NextPage = () => {
<div>
<div>
<input
style={{width: "300px"}}
className="input input-bordered join-item"
value={seaPrompt}
onChange={(e) => {
Expand Down Expand Up @@ -89,9 +90,13 @@ const ETHSpace: NextPage = () => {
}}>Search</button>
</div>
</div>
<span className="text-sm m-10">
A search question example: Give me the examples about struct. The "type" in metadata should be "struct".
</span>
<div className="hero-content text-left">
<span className="text-sm">
<p><b>A search question example: </b></p>
<p>* Give me some function examples about NFT</p>
<p>* 0x73c7448760517E3E6e416b2c130E3c6dB2026A1d</p>
</span>
</div>
</div>
</div>
</div>
Expand Down
73 changes: 0 additions & 73 deletions packages/nextjs/pages/index copy.tsx

This file was deleted.

20 changes: 13 additions & 7 deletions packages/nextjs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ETHSpace: NextPage = () => {

//从后端获取数据集列表
const fetchOptions = () => {
return ['eth-whitepaper', 'eth-contracts'];
return ['eth-smart-contracts', 'eth-smart-contracts-sliced', "eth-smart-contracts-analysis"];
};
//获取search prompt与dataset名字后向后端发request
const handleonClick =()=>{
Expand All @@ -31,11 +31,12 @@ const ETHSpace: NextPage = () => {
<div className="hero min-h-screen bg-base-200 bg-gradient-to-r from-green-500 to-blue-500">
<div className="hero-content text-center">
<div className="max-w-md">
<h1 className="text-5xl font-bold">ETH-SPACE</h1>
<p className="py-6">AI-based Smart Contract Explorer</p>
<h1 className="text-2xl font-bold">AI-based Smart Contract Explorer</h1>
<p className="py-6">-- Smart Contract Search Platform based on AI<br></br>
-- Let AI fully assist smart contract developers</p>
<div className="form-control mb-6">
<label className="label cursor-pointer">
<span className="label-text text-2xl">Search in the Public Dataset</span>
<span className="label-text text-2xl">Search in the Free Dataset:</span>
<input
type="checkbox"
className="toggle toggle-accent"
Expand All @@ -50,6 +51,7 @@ const ETHSpace: NextPage = () => {
<div>
<div>
<input
style={{width: "300px"}}
className="input input-bordered join-item"
value={seaPrompt}
onChange={(e) => {
Expand Down Expand Up @@ -89,9 +91,13 @@ const ETHSpace: NextPage = () => {
}}>Search</button>
</div>
</div>
<span className="text-sm m-10">
A search question example: Give me the examples about struct. The "type" in metadata should be "struct".
</span>
<div className="hero-content text-left">
<span className="text-sm">
<p><b>A search question example: </b></p>
<p>* Give me some function examples about NFT</p>
<p>* 0x73c7448760517E3E6e416b2c130E3c6dB2026A1d</p>
</span>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit ab29358

Please sign in to comment.