xxx -> TODO allTruthy

This commit is contained in:
Kalle 2022-06-11 15:36:58 +03:00
parent 904f9877d1
commit e16ad178ec
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,6 @@ const dimensions = {
lg: 125,
};
// xxx: ugly placeholder when image broken (because of webp?)
export function Avatar({
discordId,
discordAvatar,
@ -25,7 +24,6 @@ export function Avatar({
<img
className={clsx("avatar", className)}
src={
// xxx: picture src offer png fallback
discordAvatar
? `https://cdn.discordapp.com/avatars/${discordId}/${discordAvatar}.webp${
size === "lg" ? "" : "?size=80"

View File

@ -1,4 +1,6 @@
// xxx: should instead take array of functions to improve efficiency (not run them all if not necessary)
// TODO: when more examples of permissions profile difference between
// this implementation and one that takes arrays
// (not all arrays need to necessarily run but they need to be defined)
export function allTruthy(arr: unknown[]) {
return arr.every(Boolean);
}