Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/SponsorCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const logo = sponsorLogos[sponsor.id];
description && (
<div class="flex-1">
<h2 class="text-2xl font-bold mb-2 ">
{ !isSponsorPage ?
{ !isSponsorPage && tier !== 'Partners' ?
<a href={`/sponsor/${sponsor.id}`}>
{title}
</a> :
Expand Down
8 changes: 5 additions & 3 deletions src/pages/sponsor/[sponsor]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ const {sponsor } = Astro.params;

export async function getStaticPaths() {

const sponsors = await getCollection("sponsors", ({ data }) => {
return import.meta.env.MODE === "production" ? data.draft !== true : true;
});
const isProduction = import.meta.env.MODE === "production";

const sponsors = await getCollection("sponsors", ({ data }) =>
data.tier !== "Partners" && (isProduction ? data.draft !== true : true)
);

return sponsors.map((sponsor: any) => ({
params: {
Expand Down