This commit is contained in:
MeowcaTheoRange 2023-09-24 19:41:01 -05:00
parent f06256d97e
commit 1fa4a00841
3 changed files with 14 additions and 3 deletions

View file

@ -16,6 +16,7 @@ export default function ClanCard({
clan: ClientClan; clan: ClientClan;
link?: boolean; link?: boolean;
}) { }) {
console.log(clan);
return ( return (
<Box <Box
properties={{ properties={{
@ -61,7 +62,11 @@ export default function ClanCard({
{clan.displayName ?? clan.name} {clan.displayName ?? clan.name}
</ConditionalParent> </ConditionalParent>
</p> </p>
<Conditional condition={clan.flairs != null}> <Conditional
condition={
clan.flairs != null && clan.flairs.length > 0
}
>
<div className={globals.horizontalListLeft}> <div className={globals.horizontalListLeft}>
{clan.flairs?.map(flair => ( {clan.flairs?.map(flair => (
<FlairCard flair={flair} /> <FlairCard flair={flair} />

View file

@ -87,7 +87,11 @@ export default function TrollCard({
Also known as <b>{troll.username}</b> online. Also known as <b>{troll.username}</b> online.
</p> </p>
</Conditional> </Conditional>
<Conditional condition={troll.flairs != null}> <Conditional
condition={
troll.flairs != null && troll.flairs.length > 0
}
>
<div className={globals.horizontalListLeft}> <div className={globals.horizontalListLeft}>
{troll.flairs?.map(flair => ( {troll.flairs?.map(flair => (
<FlairCard flair={flair} /> <FlairCard flair={flair} />

View file

@ -34,7 +34,9 @@ export default function Index({
async function getTroll(page?: number) { async function getTroll(page?: number) {
const res = await fetch( const res = await fetch(
page ? "/api/troll/.../" + page : "/api/troll/..." page
? "/api/troll/" + clan.name + "/.../" + page
: "/api/troll/" + clan.name + "/..."
); );
const json = await res.json(); const json = await res.json();
setFetchedTrolls(json); setFetchedTrolls(json);