diff --git a/app/modal.tsx b/app/modal.tsx index 9d1366c..b6e4c51 100644 --- a/app/modal.tsx +++ b/app/modal.tsx @@ -49,7 +49,14 @@ const Modal: React.FC<{ isOpen: boolean; onClose: () => void; item: { username:
-

{item.username}s Callouts

+
+ {`${item.username}'s +

{item.username}s Callouts

+

{ @@ -24,7 +26,7 @@ const generateRandomPoint = () => { return Math.floor(Math.random() * (100 - 10 + 1)) + 10; }; -function Home() { +const Home: React.FC = () => { const [modalOpen, setModalOpen] = useState(false); const { login, user, ready, logout, linkTwitter, unlinkTwitter, linkWallet, unlinkWallet } = usePrivy(); const [darkMode, setDarkMode] = useState(true); @@ -35,6 +37,7 @@ function Home() { const [isJoined, setIsJoined] = useState(false); const [selectedItem, setSelectedItem] = useState(null); const [newCallModalOpen, setNewCallModalOpen] = useState(false); + const [userDetailModalOpen, setUserDetailModalOpen] = useState(false); const [selectedPeriod, setSelectedPeriod] = useState('All Time'); const periods = ['All Time', 'Weekly', 'Monthly']; @@ -59,6 +62,20 @@ function Home() { setNewCallModalOpen(false); }; + // Function to handle opening user detail modal + const openUserDetailModal = (username) => { + setUserDetailModalOpen(true); + setTimeout(() => { + setModalOpen(false); + // Additional logic if needed to fetch user details + }, 10); + }; + + // Function to handle closing user detail modal + const closeUserDetailModal = () => { + setUserDetailModalOpen(false); + }; + const handleNewCallSubmit = (tokenId, tokenContract, tokenName) => { let twitterIntentURL = `https://x.com/intent/tweet?text=%24${tokenId}%20is%20Booming%20rn%21%20See%20ya%20on%20the%20moon%21%0A%0A%23CallFi%20%23CallingIt`; if(tokenContract.length >0){ @@ -162,7 +179,13 @@ function Home() { return (

-

CallFi

+
+

CallFi

+
{ready && user ? (
@@ -262,7 +285,7 @@ function Home() { className="w-12 h-12 rounded-full mr-4" />
-

{item["username"]}

+

openUserDetailModal(item["username"])}>{item["username"]}

{parseFloat(item["points"]).toFixed(2)}x

@@ -274,6 +297,7 @@ function Home() { +