Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrohasf committed Feb 27, 2025
1 parent 49dd854 commit 17a55f2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/app/proposals/[proposal_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@ export async function generateMetadata({
}

if (voter) {
return generateVoterMetadata(
const awaitedMetadata = await generateVoterMetadata(
proposal,
voter,
title,
description,
newVoteParsed
);
return awaitedMetadata;
}

const preview = `/api/images/og/generic?title=${encodeURIComponent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function ApprovalCastVoteDialog({
s: newVote?.support,
r: newVote?.reason,
p: newVote?.params,
w: newVote?.weight,
w: newVote?.weight || null,
a: address,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Votes/CastVoteInput/CastVoteContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const CastVoteContextProvider = ({
s: newVote?.support,
r: newVote?.reason,
p: newVote?.params,
w: newVote?.weight,
w: newVote?.weight || null,
a: address,
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/Votes/CastVoteInput/CastVoteInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export function SuccessMessage({
s: newVote?.support,
r: newVote?.reason,
p: newVote?.params,
w: newVote?.weight,
w: newVote?.weight || null,
a: address,
};

Expand Down
6 changes: 1 addition & 5 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,10 @@ export async function middleware(request: NextRequest) {
return setCorsHeaders(request, NextResponse.next());
}

if (path.startsWith("/api/images/og")) {
return setCorsHeaders(request, NextResponse.next());
}

// For non-API routes, just call next() without setting CORS headers
return NextResponse.next();
}

export const config = {
matcher: ["/", "/api/v1/:path*", "/api/images/og/:path*"],
matcher: ["/", "/api/v1/:path*"],
};

0 comments on commit 17a55f2

Please sign in to comment.