re-add per page/leaderboard embed colors
All checks were successful
Deploy Backend / deploy (push) Successful in 3m31s
Deploy Website / deploy (push) Successful in 5m17s

This commit is contained in:
Lee
2024-10-16 07:31:52 +01:00
parent 7f42a27d8f
commit ff9408fb8c
12 changed files with 131 additions and 22 deletions

View File

@ -103,14 +103,8 @@ export async function generateViewport(props: Props): Promise<Viewport> {
}
const color = await getAverageColor(leaderboard.coverImage);
if (color === undefined) {
return {
themeColor: Colors.primary,
};
}
return {
themeColor: color?.hex,
themeColor: color.hex,
};
}

View File

@ -117,14 +117,8 @@ export async function generateViewport(props: Props): Promise<Viewport> {
}
const color = await getAverageColor(player.avatar);
if (color === undefined) {
return {
themeColor: Colors.primary,
};
}
return {
themeColor: color?.hex,
themeColor: color.hex,
};
}