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.

Update page.tsx

Luna 144d3343 62e8bb87

+9 -9
+9 -9
app/leaderboard/[guildId]/page.tsx
··· 50 50 }: LeaderboardProps): Promise<Metadata> => { 51 51 const guild = await getGuild(params.guildId); 52 52 53 - const title = `${guild.name}'s Leaderboard`; 54 - const description = `Easily access and view the top chatters, voice timers, and inviters from ${guild.name} in the web.`; 53 + const title = `${guild?.name}'s Leaderboard`; 54 + const description = `Easily access and view the top chatters, voice timers, and inviters from ${guild?.name} in the web.`; 55 55 const url = getCanonicalUrl("leaderboard", params.guildId); 56 56 57 57 return { ··· 65 65 description, 66 66 url, 67 67 type: "website", 68 - images: guild?.icon ? `https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.webp?size=256` : "https://cdn.waya.one/r/discord.png" 68 + images: guild?.icon ? `https://cdn.discordapp.com/icons/${guild?.id}/${guild?.icon}.webp?size=256` : "https://cdn.waya.one/r/discord.png" 69 69 }, 70 70 twitter: { 71 71 card: "summary", ··· 88 88 return ( 89 89 <div className="w-full"> 90 90 91 - {design.backgroundColor && 91 + {design?.backgroundColor && 92 92 <style> 93 93 {` 94 94 :root { ··· 99 99 } 100 100 101 101 <div className="relative mb-12 w-full"> 102 - <div className="h-32 md:h-64 overflow-hidden rounded-xl" style={{ background: `url(${design.banner})`, backgroundRepeat: "no-repeat", backgroundSize: "cover" }}> 103 - {!design.banner && 102 + <div className="h-32 md:h-64 overflow-hidden rounded-xl" style={{ background: `url(${design?.banner})`, backgroundRepeat: "no-repeat", backgroundSize: "cover" }}> 103 + {!design?.banner && 104 104 <Image src="/paint.jpg" width={3840 / 2} height={2160 / 2} alt="" /> 105 105 } 106 106 </div> 107 107 108 108 <div style={{ backgroundColor: "var(--background-rgb)" }} className="text-lg flex items-center absolute bottom-[-44px] md:bottom-[-34px] left-[-6px] md:left-10 py-4 px-5 rounded-tr-3xl md:rounded-3xl"> 109 - <Image src={guild?.icon ? `https://cdn.discordapp.com/icons/${guild.id}/${guild.icon}.webp?size=64` : "https://cdn.waya.one/r/discord.png"} width={64} height={64} alt="Server" className="rounded-full h-14 w-14 mr-3" /> 109 + <Image src={guild?.icon ? `https://cdn.discordapp.com/icons/${guild?.id}/${guild?.icon}.webp?size=64` : "https://cdn.waya.one/r/discord.png"} width={64} height={64} alt="Server" className="rounded-full h-14 w-14 mr-3" /> 110 110 <div> 111 111 <div className="text-xl dark:text-neutral-200 text-neutral-800 font-medium">{guild?.name || "Unknown Server"}</div> 112 112 <div className="text-sm">{intl.format(guild?.memberCount || 0)} members</div> ··· 142 142 (members || []).sort((a, b) => (b?.activity?.[searchParams.type as Types] ?? 0) - (a?.activity?.[searchParams.type as Types] ?? 0)).map((member) => 143 143 <div 144 144 key={member.id} 145 - className={`${design.backgroundColor ? "dark:bg-wamellow/60 bg-wamellow-100/60" : "dark:bg-wamellow bg-wamellow-100"} mb-4 rounded-md p-3 flex items-center`} 145 + className={`${design?.backgroundColor ? "dark:bg-wamellow/60 bg-wamellow-100/60" : "dark:bg-wamellow bg-wamellow-100"} mb-4 rounded-md p-3 flex items-center`} 146 146 > 147 147 148 148 <Image src={member.avatar ? `https://cdn.discordapp.com/avatars/${member.id}/${member.avatar}.webp?size=56` : "https://cdn.waya.one/r/discord.png"} width={56} height={56} alt="User" className="rounded-full h-12 w-12 mr-3" /> ··· 178 178 } 179 179 180 180 <div className="flex h-10 w-full mt-5"> 181 - <PageComponent searchParams={searchParams} membersLength={members.length} /> 181 + <PageComponent searchParams={searchParams} membersLength={members?.length || 0} /> 182 182 </div> 183 183 184 184 </div>