Skip to content

Commit 420c8cf

Browse files
committed
chore: convert to use enums
1 parent 0f1bb24 commit 420c8cf

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

components/tournament/TournamentStage.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts" setup>
22
import TournamentBracketViewer from "./TournamentBracketViewer.vue";
33
import SwissBracketViewer from "./SwissBracketViewer.vue";
4+
import { e_tournament_stage_types_enum } from "~/generated/zeus";
45
</script>
56
<template>
67
<!-- Swiss Format - groups represent record pools, so don't loop through them -->
@@ -50,8 +51,8 @@ export default {
5051
computed: {
5152
isSwissFormat() {
5253
return (
53-
this.stage?.type === "Swiss" ||
54-
this.stage?.e_tournament_stage_type?.value === "Swiss"
54+
this.stage?.type === e_tournament_stage_types_enum.Swiss ||
55+
this.stage?.e_tournament_stage_type?.value === e_tournament_stage_types_enum.Swiss
5556
);
5657
},
5758
maxGroups() {

utilities/tournamentRoundLabels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function getRoundLabel(
1414
}
1515

1616
// For Swiss format, show record labels (handled in SwissBracketViewer)
17-
if (stageType === "Swiss") {
17+
if (stageType === e_tournament_stage_types_enum.Swiss) {
1818
return `Round ${roundNumber}`;
1919
}
2020

0 commit comments

Comments
 (0)