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
Some checks failed
Deploy with Docker Compose / deploy (push) Failing after 2m23s
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user