Skip to content

Commit

Permalink
feat: enable revalidate for every page (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaiJi authored May 2, 2024
1 parent 77a47b6 commit 58fc778
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export default function Header() {
<div className="flex">
<h1 className="text-base mt-0">FEC·兽展日历</h1>
<span className="text-base mx-1">/</span>
<span className="text-base">等待假期🌔</span>
<span className="text-base">五一五一🥳</span>
{/* <span className="text-base">等待假期🌔</span> */}
</div>
</div>
<div
Expand Down
1 change: 1 addition & 0 deletions src/pages/[organization]/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -523,5 +523,6 @@ export async function getStaticProps(context: GetStaticPropsContext) {
})),
},
},
revalidate: 86400,
};
}
4 changes: 2 additions & 2 deletions src/pages/[organization]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ export default function OrganizationDetail(props: {
rel="noreferrer"
className="flex items-center justify-center bg-blue-800 hover:bg-blue-900 transition rounded-xl px-4 py-1 text-white text-center"
>
<FaPaw className="mr-2" />
去 Wikifur 了解更多
<FaPaw className="mr-2" />去 Wikifur 了解更多
</a>
)}

Expand Down Expand Up @@ -298,5 +297,6 @@ export async function getStaticProps(context: GetStaticPropsContext) {
},
},
},
revalidate: 86400,
};
}
1 change: 1 addition & 0 deletions src/pages/city.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,6 @@ export async function getStaticProps() {
},
},
},
revalidate: 86400,
};
}
6 changes: 5 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ function DurationSection({
{durationType === DurationType.NextYear && "看看来年"}
</h2>
{months.map((month) => (
<div key={month} className="border rounded-xl bg-gray-100 p-2 md:p-6 my-4">
<div
key={month}
className="border rounded-xl bg-gray-100 p-2 md:p-6 my-4"
>
<h3 className="text-lg md:text-xl text-red-400 font-bold mb-2 md:mb-6">
{month !== "unknown"
? durationType === DurationType.NextYear
Expand Down Expand Up @@ -228,5 +231,6 @@ export async function getStaticProps() {
props: {
events,
},
revalidate: 86400,
};
}
1 change: 1 addition & 0 deletions src/pages/organization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,6 @@ export async function getStaticProps() {
},
},
},
revalidate: 86400,
};
}
4 changes: 3 additions & 1 deletion src/pages/years.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default function Years({ events }: { events: Event[] }) {
{yearLabel === "no-date" ? "暂未定档" : yearLabel}
</h2>
<p className="text-gray-600 mb-4">
{yearLabel=== "no-date" ? "" : `${yearLabel}年`}共有 {groupByYearEvents[yearLabel].length} 场活动:
{yearLabel === "no-date" ? "" : `${yearLabel}年`}共有{" "}
{groupByYearEvents[yearLabel].length} 场活动:
</p>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-10">
{groupByYearEvents[yearLabel].map((event) => (
Expand Down Expand Up @@ -102,5 +103,6 @@ export async function getStaticProps() {
},
},
},
revalidate: 86400,
};
}

0 comments on commit 58fc778

Please sign in to comment.