-
{profile.team}
+
+ {profile.team}
+
+
{profile.group && {fmt(t.common.group, { group: profile.group })}}
{fmt(t.team.eloBadge, { rating: profile.elo })}
diff --git a/src/lib/i18n/de.ts b/src/lib/i18n/de.ts
index dfab195..1dc2455 100644
--- a/src/lib/i18n/de.ts
+++ b/src/lib/i18n/de.ts
@@ -66,6 +66,7 @@ export const de: Dict = {
nextUp: "Als Nächstes",
nextUpDay: "Als Nächstes · {day}",
comingUp: "Demnächst",
+ myTeam: "Mein Team",
latestResults: "Letzte Ergebnisse",
empty: "Der Spielplan ist geladen. Sobald das Turnier läuft, tauchen die Spiele hier auf.",
},
@@ -371,6 +372,8 @@ export const de: Dict = {
team: {
unknown: "Unbekanntes Team.",
allTeams: "Alle Teams",
+ follow: "Diesem Team folgen",
+ unfollow: "Diesem Team nicht mehr folgen",
eloBadge: "Elo {rating}",
titleOddsBadge: "Titel {pct}",
advanceOddsBadge: "Weiterkommen {pct}",
diff --git a/src/lib/i18n/en.ts b/src/lib/i18n/en.ts
index 9c1625c..1900bc2 100644
--- a/src/lib/i18n/en.ts
+++ b/src/lib/i18n/en.ts
@@ -65,6 +65,7 @@ export const en = {
nextUp: "Next up",
nextUpDay: "Next up · {day}",
comingUp: "Coming up",
+ myTeam: "My team",
latestResults: "Latest results",
empty: "The schedule is ready. Matches will appear here once the tournament kicks off.",
},
@@ -370,6 +371,8 @@ export const en = {
team: {
unknown: "Unknown team.",
allTeams: "All teams",
+ follow: "Follow this team",
+ unfollow: "Unfollow this team",
eloBadge: "Elo {rating}",
titleOddsBadge: "Title {pct}",
advanceOddsBadge: "Advance {pct}",
diff --git a/src/stores/favoriteStore.ts b/src/stores/favoriteStore.ts
new file mode 100644
index 0000000..15764ed
--- /dev/null
+++ b/src/stores/favoriteStore.ts
@@ -0,0 +1,29 @@
+import { create } from 'zustand';
+
+const STORAGE_KEY = 'cup26:favorite';
+
+function readFavorite(): string | null {
+ try {
+ return localStorage.getItem(STORAGE_KEY);
+ } catch {
+ return null;
+ }
+}
+
+interface FavoriteState {
+ favorite: string | null;
+ toggleFavorite: (team: string) => void;
+}
+
+/** One starred team — its next match gets pinned on the Live tab. */
+export const useFavoriteStore = create((set, get) => ({
+ favorite: readFavorite(),
+ toggleFavorite: (team) => {
+ const next = get().favorite === team ? null : team;
+ try {
+ if (next) localStorage.setItem(STORAGE_KEY, next);
+ else localStorage.removeItem(STORAGE_KEY);
+ } catch { /* private mode */ }
+ set({ favorite: next });
+ },
+}));