Tweaks
This commit is contained in:
parent
f06256d97e
commit
1fa4a00841
3 changed files with 14 additions and 3 deletions
|
@ -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} />
|
||||
|
|
|
@ -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} />
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue