Commit 11cdd3d
Refactor project details page (#527)
* feat: Implement a comprehensive project and campaign creation flow, including dedicated public campaign pages.
* refactor(projects): redesign project page UI and retire legacy stack
Replace the legacy ProjectLayout + ProjectSidebar shell with a new
HeroSection + tabbed layout colocated under app/(landing)/projects/[slug]/components.
All existing functionality is preserved: vote/back/follow/share actions,
realtime vote counts, milestone submissions and disputes, backers list,
and the existing comment system continues to render via ProjectComments.
The campaigns/[slug] route is migrated to the same components so both
routes share one source of truth, and the now-unused legacy files under
components/project-details/ (project-layout, project-sidebar/*,
project-details, project-team, project-about, project-backers/*,
project-voters/*, project-loading, CampaignEndBanner, ProjectFundEscrow)
are deleted. comment-section, funding-modal, and project-milestone are
kept since they are still consumed by the new UI and standalone routes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(projects): address review findings on project details refactor
- Distinguish API 404 from transport/5xx errors in both project/campaign
fetch flows so backend incidents surface as "Failed to fetch" instead
of being masked as "Project not found" (new isApiNotFound helper).
- Reset activeTab when the tab set changes so the selection never points
at a tab that no longer exists.
- Handle promise rejection from the params prop with notFound() instead
of leaving the page stuck on the skeleton.
- Backers tab: gate the funding CTA on getProjectStatus(vm) so a fully
funded campaign with a stale CAMPAIGNING backend status no longer shows
an actionable Back CTA while the hero shows "Funded".
- Milestones tab: map resubmission_required (and variants) to in-progress
so resubmittable rows are styled and counted correctly; harden formatDate
with an explicit Number.isFinite check.
- Project actions: subscribe useVoteRealtime + getVoteCounts to the
derived entityType so submission votes don't get routed through the
campaign channel; merge realtime vote payloads so a teammate's update
cannot wipe the viewer's userVote selection; split the cancel flow into
separate on-chain cancel and off-chain delete steps with distinct toasts
and a reportError on the delete failure.
- Voters tab: implement Load More pagination with totalItems tracking and
id-based dedupe so the list is no longer silently capped at 20; merge
realtime vote payloads so onVoteDeleted no longer force-clears userVote.
- Team member card: only react to Enter/Space when the card itself is
focused so nested profile/email links are not stolen.
- Team tab: drop the invalid member.email vs creator.username comparison
in matchesCreator (VMCreator has no email field).
- Deduplicate formatRelative into utils.ts (shared between backer-card
and voter-row) and add a Number.isFinite guard.
- Delete the now-dead components/project-details/project-milestone/index.tsx
(no consumers after the project layout retirement).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: minor fixes
* fix: minor fixes
---------
Co-authored-by: Collins Ikechukwu <collinschristroa@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 96133c3 commit 11cdd3d
39 files changed
Lines changed: 3944 additions & 3119 deletions
File tree
- app/(landing)
- campaigns/[slug]
- projects/[slug]
- components
- components/project-details
- project-backers
- project-milestone
- project-sidebar
- project-voters
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| |||
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
21 | 38 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 39 | + | |
25 | 40 | | |
26 | 41 | | |
| 42 | + | |
| 43 | + | |
27 | 44 | | |
28 | 45 | | |
29 | | - | |
| 46 | + | |
30 | 47 | | |
31 | 48 | | |
32 | | - | |
| 49 | + | |
33 | 50 | | |
34 | 51 | | |
35 | 52 | | |
| |||
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
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 | | - | |
| 58 | + | |
74 | 59 | | |
75 | 60 | | |
76 | 61 | | |
77 | 62 | | |
| 63 | + | |
78 | 64 | | |
79 | | - | |
| 65 | + | |
80 | 66 | | |
81 | 67 | | |
82 | 68 | | |
83 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
84 | 73 | | |
85 | 74 | | |
86 | 75 | | |
87 | 76 | | |
88 | 77 | | |
89 | 78 | | |
90 | | - | |
91 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
92 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
93 | 91 | | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
108 | 128 | | |
109 | | - | |
| 129 | + | |
110 | 130 | | |
111 | 131 | | |
112 | 132 | | |
113 | 133 | | |
114 | 134 | | |
115 | 135 | | |
116 | 136 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
120 | 196 | | |
121 | | - | |
| 197 | + | |
122 | 198 | | |
123 | 199 | | |
124 | 200 | | |
125 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
126 | 250 | | |
| 251 | + | |
127 | 252 | | |
128 | 253 | | |
129 | 254 | | |
130 | 255 | | |
131 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
132 | 262 | | |
133 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
134 | 268 | | |
135 | | - | |
| 269 | + | |
136 | 270 | | |
137 | 271 | | |
138 | 272 | | |
| |||
0 commit comments