Skip to content

Commit 500fa84

Browse files
authored
chore: release v0.8.1 (#2427)
2 parents 79a1a2c + ad7b241 commit 500fa84

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

app/components/Landing/IntroHeader.vue

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const { env } = useAppConfig().buildInfo
66
const activeNoodlesData = ACTIVE_NOODLES.map(noodle => ({
77
key: noodle.key,
88
date: noodle.date,
9+
dateTo: noodle.dateTo,
910
timezone: noodle.timezone,
1011
tagline: noodle.tagline,
1112
}))
@@ -54,22 +55,26 @@ onPrehydrate(el => {
5455
}
5556
5657
const currentActiveNoodles = activeNoodles.filter(noodle => {
57-
const todayDate = new Intl.DateTimeFormat('en-US', {
58+
const todayDate = new Date()
59+
const todayDateRaw = new Intl.DateTimeFormat('en-US', {
5860
timeZone: noodle.timezone === 'auto' ? undefined : noodle.timezone,
5961
month: '2-digit',
6062
day: '2-digit',
6163
year: 'numeric',
62-
}).format(new Date())
64+
}).format(todayDate)
6365
64-
const noodleDate =
65-
noodle.date &&
66-
new Intl.DateTimeFormat('en-US', {
66+
const noodleDateFrom = new Date(noodle.date!)
67+
if (!noodle.dateTo) {
68+
const noodleDateFromRaw = new Intl.DateTimeFormat('en-US', {
6769
timeZone: noodle.timezone === 'auto' ? undefined : noodle.timezone,
6870
month: '2-digit',
6971
day: '2-digit',
7072
year: 'numeric',
71-
}).format(new Date(noodle.date))
72-
return todayDate === noodleDate
73+
}).format(noodleDateFrom)
74+
return todayDateRaw === noodleDateFromRaw
75+
}
76+
const noodleDateTo = new Date(noodle.dateTo!)
77+
return todayDate >= noodleDateFrom && todayDate <= noodleDateTo
7378
})
7479
7580
if (!currentActiveNoodles.length) return

app/components/Noodle/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export type Noodle = {
99
timezone?: string
1010
// Date for the noodle
1111
date?: string
12+
// Date to for the noodle
13+
dateTo?: string
1214
// Logo for the noodle - could be any component. Relative parent - intro section
1315
logo: Component
1416
// Show npmx tagline or not (default is true)
@@ -41,6 +43,7 @@ export const ACTIVE_NOODLES: Noodle[] = [
4143
key: 'artemis',
4244
logo: NoodleArtemisLogo,
4345
date: '2026-04-08T12:00:00Z',
46+
dateTo: '2026-04-12T01:00:00Z',
4447
timezone: 'America/Los_Angeles',
4548
tagline: true,
4649
},

0 commit comments

Comments
 (0)