feat: add DLC page

This commit is contained in:
2026-06-18 22:42:34 -03:00
parent c2e2f4c216
commit 8066ad4434
4 changed files with 351 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
import { DLC } from "@/lib/utils";
export type PlatformFilter = 'all' | 'steam' | 'epic' | 'xbox';
export const isOnSteam = (dlc: DLC) =>
dlc.dlcIds.steam !== '0' && dlc.dlcIds.steam !== '-1';
export const isOnEpic = (dlc: DLC) =>
dlc.dlcIds.epic !== 'FFFFFFFFFFFFFFFF' && dlc.dlcIds.epic !== '0';
export const isOnXbox = (dlc: DLC) =>
dlc.dlcIds.grdk !== '9ZZZZZZZZZZZ' && dlc.dlcIds.grdk !== '0';
export const matchesPlatform = (dlc: DLC, filter: PlatformFilter) => {
if (filter === 'all') return true;
if (filter === 'steam') return isOnSteam(dlc);
if (filter === 'epic') return isOnEpic(dlc);
if (filter === 'xbox') return isOnXbox(dlc);
return true;
};