forked from Cylo-Traders/Agrocylo-PIP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
112 lines (101 loc) · 3.08 KB
/
Copy pathindex.tsx
File metadata and controls
112 lines (101 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import type { ReactNode } from 'react';
import { Link } from 'react-router-dom';
export { CampaignDetailPage } from './CampaignDetailPage';
export { CreateCampaignPage } from './CreateCampaignPage';
export { AdminDashboardPage } from './AdminDashboardPage';
export { ActivityFeedPage } from './ActivityFeedPage';
type PlaceholderPageProps = {
eyebrow: string;
title: string;
description: string;
action?: ReactNode;
};
function PlaceholderPage({
eyebrow,
title,
description,
action,
}: PlaceholderPageProps) {
return (
<section className="mx-auto flex max-w-7xl items-center px-4 py-16 sm:px-6 sm:py-24 lg:px-8">
<div className="w-full rounded-campaign border border-soil-200 bg-white p-8 shadow-campaign sm:p-12">
<p className="text-label text-leaf-700">{eyebrow}</p>
<h1 className="mt-3 max-w-3xl text-soil-950">{title}</h1>
<p className="mt-4 max-w-2xl text-body text-soil-600">{description}</p>
{action && <div className="mt-8">{action}</div>}
</div>
</section>
);
}
const primaryLinkClass =
'inline-flex rounded-lg bg-leaf-700 px-5 py-3 text-sm font-semibold text-white transition-colors hover:bg-leaf-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-leaf-500 focus-visible:ring-offset-2';
export function HomePage() {
return (
<PlaceholderPage
eyebrow="Agricultural investment, made transparent"
title="Fund farms. Grow communities."
description="Discover verified agricultural campaigns and follow every milestone from funding to harvest."
action={
<Link to="/campaigns" className={primaryLinkClass}>
Explore campaigns
</Link>
}
/>
);
}
export function CampaignsPage() {
return (
<PlaceholderPage
eyebrow="Marketplace"
title="Campaigns"
description="Browse active and completed agricultural funding campaigns."
action={
<Link to="/campaigns/new" className={primaryLinkClass}>
Create a campaign
</Link>
}
/>
);
}
export function FarmerDashboardPage() {
return (
<PlaceholderPage
eyebrow="Dashboard"
title="Farmer dashboard"
description="Manage your campaigns, report milestones, and track funding from one place."
/>
);
}
export function InvestorDashboardPage() {
return (
<PlaceholderPage
eyebrow="Dashboard"
title="Investor dashboard"
description="Monitor your agricultural investments, campaign progress, and returns."
/>
);
}
// ActivityFeedPage is the real implementation exported from ./ActivityFeedPage
export function ProfilePage() {
return (
<PlaceholderPage
eyebrow="Your account"
title="Profile"
description="Manage your personal details, wallet preferences, and platform settings."
/>
);
}
export function NotFoundPage() {
return (
<PlaceholderPage
eyebrow="Error 404"
title="Page not found"
description="The page you requested does not exist or may have moved."
action={
<Link to="/" className={primaryLinkClass}>
Return home
</Link>
}
/>
);
}