mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-18 16:43:56 -05:00
xxx -> TODO allTruthy
This commit is contained in:
parent
904f9877d1
commit
e16ad178ec
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user