diff --git a/.env.development b/.env.development deleted file mode 100644 index 3ce6624..0000000 --- a/.env.development +++ /dev/null @@ -1,2 +0,0 @@ -NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321 -NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 diff --git a/README.md b/README.md index f52103d..da50439 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ RegenBazar is a decentralized application (dApp) that serves as a bridge between ## πŸš€ Live Demo **Website**: [demo.regenbazar.com](https://demo.regenbazar.com) -*Hosted on Netlify using Cloudflare* +_Hosted on Netlify using Cloudflare_ ## πŸ› οΈ Technology Stack @@ -92,7 +92,8 @@ npm|bun run dev **Open the application:** Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - ``` + +``` ## 🌱 Parent Project: EcoSynthesisX @@ -160,3 +161,4 @@ This project is part of the EcoSynthesisX ecosystem and follows open-source prin --- *Building the future of regenerative economics through Web3 innovation* 🌱 +``` diff --git a/src/app/create-nonprofit-profile/page.tsx b/src/app/create-nonprofit-profile/page.tsx index 9d6c2e0..283fb33 100644 --- a/src/app/create-nonprofit-profile/page.tsx +++ b/src/app/create-nonprofit-profile/page.tsx @@ -10,7 +10,7 @@ import { useWallet } from '../../context/WalletContext' import { depositVault } from '../../lib/contracts/depositVault' import { generateProfileImage } from '../../lib/generateImage' import { FEATURES } from '../../lib/config' - +import TweetButton from '@/components/TweetButton' interface ImpactAction { title: string achievedImpact: string @@ -301,6 +301,7 @@ const CreateNonProfitProfile = () => { <>
{/* Impact Product Data Form */} +

IMPACT PRODUCT DATA @@ -633,12 +634,12 @@ const CreateNonProfitProfile = () => {

Promote to your community and potential buyers

- + {/*------------ Tweet Button here --------- */} +
) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f655074..5917cd2 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -28,6 +28,7 @@ export default function RootLayout({ return ( diff --git a/src/app/projects/page.tsx b/src/app/projects/page.tsx index 907d38e..c8ff0a5 100644 --- a/src/app/projects/page.tsx +++ b/src/app/projects/page.tsx @@ -6,6 +6,7 @@ import { supabase } from '../../lib/supabase' import { Leaf, Search } from 'lucide-react' import toast from 'react-hot-toast' import PurchaseModal from '../../components/PurchaseModal' +import TweetButton from '@/components/TweetButton' interface Project { id: string @@ -50,7 +51,10 @@ const Projects = () => { const [selectedProject, setSelectedProject] = useState(null) const [isPurchaseModalOpen, setIsPurchaseModalOpen] = useState(false) const [walletAddress, _setWalletAddress] = useState(null) - + { + /*------------ state to manage purchase status --------- */ + } + const [isPurchaseSuccess, setIsPurchaseSuccess] = useState(false) useEffect(() => { // const checkWallet = async () => { // if (typeof window.ethereum !== 'undefined') { @@ -134,6 +138,10 @@ const Projects = () => { } const handlePurchaseComplete = () => { + { + /*------------ updating state of purchase --------- */ + } + setIsPurchaseSuccess(true) fetchProjects() // Refresh projects to update purchase counts setIsPurchaseModalOpen(false) setSelectedProject(null) @@ -267,6 +275,14 @@ const Projects = () => { onPurchaseComplete={handlePurchaseComplete} /> )} + {/*------------ Tweet Button here --------- */} + {isPurchaseSuccess && ( + + )} ) diff --git a/src/app/stake/page.tsx b/src/app/stake/page.tsx index 4d878f7..7ba7225 100644 --- a/src/app/stake/page.tsx +++ b/src/app/stake/page.tsx @@ -7,7 +7,7 @@ import { Loader2, Shield } from 'lucide-react' import toast from 'react-hot-toast' import { projectService } from '../../lib/projectService' import { depositVault } from '../../lib/contracts/depositVault' - +import TweetButton from '@/components/TweetButton' interface AvailableProduct { id: string title: string @@ -64,7 +64,10 @@ const Stake = () => { const [hoveredItem, setHoveredItem] = useState(null) const [isProcessing, setIsProcessing] = useState(false) const [stakeAmount] = useState('0.01') - + { + /*------------ state for tracking staking status --------- */ + } + const [isStaking, setIsStaking] = useState(false) useEffect(() => { const checkWallet = async () => { try { @@ -192,6 +195,10 @@ const Stake = () => { ]) } toast.success('Successfully staked') + { + /*------------ updating state of staking --------- */ + } + setIsStaking(true) } else { throw new Error(result.error || 'Failed to stake product') } @@ -334,6 +341,14 @@ const Stake = () => { > Lock + {isStaking && ( + // ------------ Tweet Button here --------- + + )} )}
@@ -369,7 +384,7 @@ const Stake = () => { {stakedTokens.map((token) => (
setHoveredItem(`staked-token-${token.id}`)} onMouseLeave={() => setHoveredItem(null)} > @@ -406,14 +421,25 @@ const Stake = () => { lock end date:{' '} {token.lock_end_date}

- {hoveredItem === `staked-token-${token.id}` && ( - - )} + +
+ {hoveredItem === `staked-token-${token.id}` && ( + + )} +
+
+ {/* // ------------ Tweet Button here --------- */} +
+
))} diff --git a/src/components/TweetButton.tsx b/src/components/TweetButton.tsx new file mode 100644 index 0000000..7bd30db --- /dev/null +++ b/src/components/TweetButton.tsx @@ -0,0 +1,19 @@ +'use client' +// use your button or a + + ) +}