-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
104 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,64 @@ | ||
const versions: { version: string; start: number; items: string[] }[] = [ | ||
{ | ||
version: "4.8", | ||
start: new Date(2024, 7 - 1, 16).getTime(), | ||
items: ["Emilie", "Lumidouce Elegy"], | ||
}, | ||
{ | ||
version: "5.0", | ||
start: new Date(2024, 8 - 1, 28).getTime(), | ||
items: [ | ||
"Mualani", | ||
"Kinich", | ||
"Kachina", | ||
"Fang of the Mountain King", | ||
"Surf’s Up", | ||
"Flute of Ezpitzal", | ||
"Earth Shaker", | ||
"Footprint of the Rainbow", | ||
"Ring of Yaxche", | ||
"Chain Breaker", | ||
"Ash-Graven Drinking Horn", | ||
], | ||
}, | ||
{ | ||
version: "5.1", | ||
start: new Date("2024-10-09").getTime(), | ||
items: [ | ||
"Xilonen", | ||
"Peak Patrol Song", | ||
"Sturdy Bone", | ||
"Mountain-Bracing Bolt", | ||
"Fruitful Hook", | ||
], | ||
}, | ||
]; | ||
|
||
export function findRecents() { | ||
const now = new Date().getTime(); | ||
const currentIndex = versions.findLastIndex((version) => version.start < now); | ||
|
||
if (currentIndex === -1) { | ||
return { current: [], upcoming: [] }; | ||
} | ||
|
||
return { | ||
current: versions[currentIndex].items, | ||
upcoming: | ||
currentIndex > versions.length - 2 | ||
? [] | ||
: versions[currentIndex + 1].items, | ||
}; | ||
} | ||
const versions: { version: string; start: number; items: string[] }[] = [ | ||
{ | ||
version: "4.8", | ||
start: new Date(2024, 7 - 1, 16).getTime(), | ||
items: ["Emilie", "Lumidouce Elegy"], | ||
}, | ||
{ | ||
version: "5.0", | ||
start: new Date(2024, 8 - 1, 28).getTime(), | ||
items: [ | ||
"Mualani", | ||
"Kinich", | ||
"Kachina", | ||
"Fang of the Mountain King", | ||
"Surf’s Up", | ||
"Flute of Ezpitzal", | ||
"Earth Shaker", | ||
"Footprint of the Rainbow", | ||
"Ring of Yaxche", | ||
"Chain Breaker", | ||
"Ash-Graven Drinking Horn", | ||
], | ||
}, | ||
{ | ||
version: "5.1", | ||
start: new Date("2024-10-09").getTime(), | ||
items: [ | ||
"Xilonen", | ||
"Peak Patrol Song", | ||
"Sturdy Bone", | ||
"Mountain-Bracing Bolt", | ||
"Fruitful Hook", | ||
], | ||
}, | ||
{ | ||
version: "5.2", | ||
start: new Date("2024-11-20").getTime(), | ||
items: [ | ||
"Chasca", | ||
"Ororon", | ||
"Astral Vulture’s Crimson Plumage", | ||
"Flower-Wreathed Feathers", | ||
"Waveriding Whirl", | ||
"Calamity of Eshu", | ||
], | ||
}, | ||
]; | ||
|
||
export function findRecents() { | ||
const now = new Date().getTime(); | ||
const currentIndex = versions.findLastIndex((version) => version.start < now); | ||
|
||
if (currentIndex === -1) { | ||
return { current: [], upcoming: [] }; | ||
} | ||
|
||
return { | ||
current: versions[currentIndex].items, | ||
upcoming: | ||
currentIndex > versions.length - 2 | ||
? [] | ||
: versions[currentIndex + 1].items, | ||
}; | ||
} |