+
+
+
Marketplace
+
Campaigns
+
+ Browse live on-chain agricultural funding campaigns and back the
+ ones you believe in.
+
+
+
+ Create a campaign
+
+
+
+ {!isEscrowConfigured() ? (
+
+
Soroban RPC not configured
+
+ Set VITE_SOROBAN_RPC_URL and{' '}
+
+ VITE_PRODUCTION_ESCROW_CONTRACT_ID
+ {' '}
+ to load campaigns from the network.
+
+
+ ) : isLoading ? (
+
+ ) : isError ? (
+
+
+ Couldn't load campaigns
+
+
+ The Soroban RPC request failed. Check your connection and try again.
+
+
+
+ ) : campaigns.length === 0 ? (
+
+
No campaigns yet
+
+ No campaigns have been created on this contract yet. Be the first to
+ launch one.
+
+
+ Create a campaign
+
+
+ ) : (
+ <>
+ {availableStatuses.length > 1 && (
+
+ {(['All', ...availableStatuses] as const).map((status) => {
+ const active = filter === status;
+ const label =
+ status === 'All' ? 'All' : STATUS_META[status].label;
+ return (
+
+ );
+ })}
+
+ )}
+
+ {visible.length === 0 ? (
+
+
+ No campaigns match the selected filter.
+
+
+ ) : (
+
+ {visible.map((overview) => (
+ -
+
+
+ ))}
+
+ )}
+ >
+ )}
+
+ );
+}
+
+export default CampaignsPage;
diff --git a/client/src/pages/index.tsx b/client/src/pages/index.tsx
index d3a74ec..a64c373 100644
--- a/client/src/pages/index.tsx
+++ b/client/src/pages/index.tsx
@@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
import { Link } from 'react-router-dom';
export { CampaignDetailPage } from './CampaignDetailPage';
+export { CampaignsPage } from './CampaignsPage';
export { CreateCampaignPage } from './CreateCampaignPage';
export { AdminDashboardPage } from './AdminDashboardPage';
export { ActivityFeedPage } from './ActivityFeedPage';
@@ -50,21 +51,6 @@ export function HomePage() {
);
}
-export function CampaignsPage() {
- return (
-