Add challenges background preference support: Extend site preferences and related components to include challengesBackground, update API and UI to handle new background image settings for challenges.
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 2m23s

This commit is contained in:
Julien Froidefond
2025-12-15 21:26:30 +01:00
parent 83446759fe
commit d3a4fa7cf5
25 changed files with 8373 additions and 12328 deletions

View File

@@ -5,6 +5,7 @@ interface Preferences {
homeBackground: string | null;
eventsBackground: string | null;
leaderboardBackground: string | null;
challengesBackground: string | null;
}
export function usePreferences() {
@@ -21,6 +22,7 @@ export function usePreferences() {
homeBackground: null,
eventsBackground: null,
leaderboardBackground: null,
challengesBackground: null,
}
);
setLoading(false);
@@ -30,6 +32,7 @@ export function usePreferences() {
homeBackground: null,
eventsBackground: null,
leaderboardBackground: null,
challengesBackground: null,
});
setLoading(false);
});
@@ -39,7 +42,7 @@ export function usePreferences() {
}
export function useBackgroundImage(
page: "home" | "events" | "leaderboard",
page: "home" | "events" | "leaderboard" | "challenges",
defaultImage: string
) {
const { preferences } = usePreferences();