diff --git a/apps/create/src/App.tsx b/apps/create/src/App.tsx index ee7d5c5..300cc93 100644 --- a/apps/create/src/App.tsx +++ b/apps/create/src/App.tsx @@ -18,15 +18,6 @@ const App = () => { Party Create - - `party-nav-link text-sm font-medium ${isActive ? "active text-[#00d4ff]" : ""}` - } - > - Search - {address && ( { Tokens - Party tokens you hold. Open to view, buy, or sell on this app. + Party tokens you hold. Open to view, buy, or sell on this app. Only ERC20 tokens are + included. diff --git a/apps/create/src/pages/Search.tsx b/apps/create/src/pages/Search.tsx index 94da5dc..4d20032 100644 --- a/apps/create/src/pages/Search.tsx +++ b/apps/create/src/pages/Search.tsx @@ -1,5 +1,5 @@ import { useForm } from "react-hook-form"; -import { useNavigate } from "react-router"; +import { Link, useNavigate } from "react-router"; import { Button, @@ -12,39 +12,106 @@ import { Label } from "@party-forever/ui"; -interface FormData { +interface TokenFormData { tokenAddress: string; } +interface ProfileFormData { + address: string; +} + export const Search = () => { const navigate = useNavigate(); - const { register, handleSubmit } = useForm(); + const tokenForm = useForm(); + const profileForm = useForm(); - const onSubmit = (data: FormData) => { + const onTokenSubmit = (data: TokenFormData) => { navigate(`/${data.tokenAddress}`); }; + const onProfileSubmit = (data: ProfileFormData) => { + navigate(`/profile/${data.address.trim()}`); + }; + return ( -
+
- View token + View ERC20 token - Enter a token address to buy, sell, or trade on Uniswap (Base) + Enter an ERC20 token address to buy, sell, or trade on Uniswap (Base) -
+
- +
+
+

Example

+ + 0x90e3b08e50bf662154964c6051ab3ce64024ff24 + +
+ + + + Profile + + Enter a wallet address to view Party ERC20 token holdings + + + +
+
+ + +
+ +
+
+

Example

+ + 0xba5f2ffb721648Ee6a6c51c512A258ec62f1D6af + +
+
+
+ + + + NFTs + + Party NFTs are pinned on IPFS and available to view and trade via OpenSea. + + +
); }; diff --git a/apps/create/src/pages/TokenDetails.tsx b/apps/create/src/pages/TokenDetails.tsx index 422f5ce..ab532a8 100644 --- a/apps/create/src/pages/TokenDetails.tsx +++ b/apps/create/src/pages/TokenDetails.tsx @@ -1,5 +1,6 @@ import { useEffect, useMemo, useState } from "react"; import { Link, useParams } from "react-router"; +import { useConnectModal } from "@rainbow-me/rainbowkit"; import { parseEther } from "viem"; import { useAccount } from "wagmi"; @@ -53,6 +54,7 @@ const ERC20_BALANCE_ABI = [ export const TokenDetails = () => { const { address } = useParams<{ address: string }>(); const { address: userAddress } = useAccount(); + const { openConnectModal } = useConnectModal(); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); @@ -215,7 +217,10 @@ export const TokenDetails = () => { > Sell -