Fix action-campaigns list shape + widen volunteer dashboard on desktop
The admin list endpoint returned a bare array but the frontend list
page expected { items: [] }. Newly-created campaigns were saving
successfully but rendering as an empty list. Wrap the response to
match the contract that the frontend was already coded against.
VolunteerLayout capped content at 800px wide, which suits the
phone-first volunteer tool pages but left most of the desktop screen
empty on the new dashboard. Bump the cap to 1280px for /volunteer
only so other volunteer pages keep their narrow sizing.
Bunker Admin
This commit is contained in:
parent
c00b4432d7
commit
76fd3c7065
@ -103,7 +103,7 @@ export default function VolunteerLayout() {
|
||||
|
||||
<Content
|
||||
style={{
|
||||
maxWidth: 800,
|
||||
maxWidth: location.pathname === '/volunteer' ? 1280 : 800,
|
||||
width: '100%',
|
||||
margin: '0 auto',
|
||||
padding: '16px 12px max(60px, calc(44px + 16px + env(safe-area-inset-bottom))) 12px',
|
||||
|
||||
@ -59,7 +59,7 @@ adminRouter.use(requireRole(...INFLUENCE_ROLES));
|
||||
adminRouter.get('/', async (_req: Request, res: Response, next: NextFunction) => {
|
||||
try {
|
||||
const campaigns = await actionCampaignsService.listCampaigns();
|
||||
res.json(campaigns);
|
||||
res.json({ items: campaigns });
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user