re-add per page/leaderboard embed colors
This commit is contained in:
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user