Compare commits

...

2 Commits

Author SHA1 Message Date
194ae7c4a1 Added comment 2026-02-07 13:09:07 +01:00
20d4aa9386 Updated snowfall logic 2026-02-07 13:08:50 +01:00

View File

@@ -7,6 +7,20 @@ import {Team} from './sections/Team';
import Snowfall from 'react-snowfall' import Snowfall from 'react-snowfall'
import { DateTime } from 'luxon'; import { DateTime } from 'luxon';
// Determines if the current date is within the snowfall season (November 15th to January 31st)
function isSnowfallSeason(date = DateTime.now()) {
const year = date.year;
const start = DateTime.local(year, 11, 15);
const end = DateTime.local(year + 1, 1, 31);
// If we're on or after November 15th, check if we're before January 31st of the next year
if (date >= start) {
return date <= end;
}
// If we're before November 15th, check if we're after January 1st of the current year
const prevEnd = DateTime.local(year, 1, 31);
return date <= prevEnd;
}
export default function LiquidDevelopment() { export default function LiquidDevelopment() {
return ( return (
<div <div
@@ -20,12 +34,7 @@ export default function LiquidDevelopment() {
pointerEvents: 'none', pointerEvents: 'none',
zIndex: 9999, zIndex: 9999,
}}> }}>
{(() => { {isSnowfallSeason() && <Snowfall snowflakeCount={80} />}
const now = DateTime.now();
return (now.month === 11 && now.day >= 15) ||
(now.month === 12) ||
(now.month === 1);
})() && <Snowfall snowflakeCount={80} />}
</div> </div>
<Navbar/> <Navbar/>