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

View file

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

View file

@ -34,7 +34,9 @@ export default function Index({
async function getTroll(page?: number) {
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();
setFetchedTrolls(json);