The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix reviews banner if origin is down

Luna bb111494 265841fc

+13 -1
+13 -1
app/(home)/ratings.component.tsx
··· 15 15 rating: "positive" | "negative"; 16 16 } 17 17 18 + // wumpus.store doesn't know how to keep a website online 19 + const review = { 20 + author: { 21 + id: "1", 22 + username: "System", 23 + avatar_url: "/waya-v3.webp" 24 + }, 25 + content: "Something went wrong when loading the reviews.", 26 + helpful: 0, 27 + rating: "positive" 28 + } satisfies Review; 29 + 18 30 export async function Ratings() { 19 31 const reviews = await fetch(`${process.env.RATINGS_API}/?id=${process.env.CLIENT_ID}`, defaultFetchOptions) 20 32 .then((res) => res.json()) 21 - .catch(() => []) as Review[]; 33 + .catch(() => [review]) as Review[]; 22 34 23 35 const cumulativeStars = reviews?.reduce((acc, review) => acc + (review.rating === "positive" ? 5 : 1), 0); 24 36 const averageStars = Math.floor(cumulativeStars / reviews.length) || 0;