web: adopt Cache Components, Partial Prefetching and ensureStatic
web / ci (push) Successful in 2m2s
web / ci (push) Successful in 2m2s
This commit is contained in:
70 files changed
+1285
-316
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { getToday } from "@/lib/today";
|
||||
import { Header } from "./Header";
|
||||
|
||||
// The logo's hats depend on today's date, which the prerendered Header
|
||||
// (a Client Component) can't read itself
|
||||
export async function SeasonalHeader() {
|
||||
const today = await getToday();
|
||||
|
||||
// let's add a santa hat during December
|
||||
const christmas = today.getMonth() === 11;
|
||||
|
||||
// let's add the student hat during STUDiO 2026
|
||||
const studentHat =
|
||||
today.getFullYear() === 2026 &&
|
||||
today.getMonth() === 7 &&
|
||||
today.getDate() >= 10 &&
|
||||
today.getDate() <= 16;
|
||||
|
||||
return <Header christmas={christmas} studentHat={studentHat} />;
|
||||
}
|
||||
Reference in new issue
Block a user