Skip to content

Commit 04e2076

Browse files
minor fixes
1 parent dcc9e6e commit 04e2076

6 files changed

Lines changed: 21 additions & 40 deletions

File tree

components/ui/BeastTab/BeastTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ const BeastTab: FC<Props> = ({
665665
packId={selectedBeast?.beastTemplateID || "1"}
666666
evolvedBeastId={evolvedBeastId}
667667
/>
668-
{displayBeasts != null ? (
668+
{displayBeasts?.length > 0 ? (
669669
<ul
670670
role="list"
671671
className="grid grid-cols-2 gap-x-5 gap-y-5 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-5"

components/ui/BeastTemplateHero/BeastTemplateHero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ const BeastTemplateHero: FC<Props> = ({ beast, beasts }) => {
437437
<h2>{maxMintByStar()}</h2>
438438
</StatsCol2>
439439
</Stats>
440-
440+
{/**TODO show evolutionary line */}
441441
<Evolutions>
442442
<EvolLabel>
443443
<h2>Evolutions</h2>

components/ui/ProductBeastView/ProductBeastView.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -560,16 +560,8 @@ const ProductBeastView: FC<Props> = ({ beast, hunterData }) => {
560560
<H3>{beast ? beast?.starLevel : "Loading..."}</H3>
561561
</AttributeBlock>
562562
<AttributeBlock>
563-
<Trait>Basic Skills</Trait>
564-
<ul>
565-
{beast
566-
? beast?.basicSkills.map((skill: any, id: any) => (
567-
<li key={id} className="leading-none">
568-
<H2Traits>{skill}</H2Traits>
569-
</li>
570-
))
571-
: "Loading..."}
572-
</ul>
563+
<Trait>Gender</Trait>
564+
<H3>{beast ? beast?.sex : "Loading..."}</H3>
573565
</AttributeBlock>
574566
<AttributeBlock>
575567
<Trait>Ultimate Skill</Trait>

components/ui/RankingList/RankingList.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -568,16 +568,16 @@ const RankingList: FC<Props> = ({ hunterData }) => {
568568
<tbody>
569569
{table.getRowModel().rows.map((row, i) => (
570570
<tr key={row.id}>
571-
<a
572-
href={
573-
row.getValue("findName") != ""
574-
? "/profile/" + row.getValue("findName")
575-
: "/profile/" + row.getValue("address")
576-
}
577-
>
578-
<TableRowWrapper>
579-
{row.getVisibleCells().map((cell) => (
580-
<td key={cell.id} className={cell.column.id}>
571+
<TableRowWrapper>
572+
{row.getVisibleCells().map((cell) => (
573+
<td key={cell.id} className={cell.column.id}>
574+
<a
575+
href={
576+
row.getValue("findName") != ""
577+
? "/profile/" + row.getValue("findName")
578+
: "/profile/" + row.getValue("address")
579+
}
580+
>
581581
{/* <div>value: {row.getValue("address")}</div> */}
582582
{cell.column.id == "findName" ? (
583583
<></>
@@ -619,10 +619,10 @@ const RankingList: FC<Props> = ({ hunterData }) => {
619619
)}
620620
</>
621621
)}
622-
</td>
623-
))}
624-
</TableRowWrapper>
625-
</a>
622+
</a>
623+
</td>
624+
))}
625+
</TableRowWrapper>
626626
</tr>
627627
))}
628628
</tbody>

framework/hooks/use-user-beasts.hook.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,12 @@ export default function useUserBeasts(user: any) {
9393
9494
let collectionRef = getAccount(acct).getCapability(BasicBeasts.CollectionPublicPath)
9595
.borrow<&{BasicBeasts.BeastCollectionPublic}>()
96-
?? panic("Could not get public beast collection reference")
9796
9897
if(collectionRef != nil) {
99-
let beastIDs = collectionRef.getIDs()
98+
let beastIDs = collectionRef!.getIDs()
10099
101100
for id in beastIDs {
102-
let borrowedBeast = collectionRef.borrowBeast(id: id)!
101+
let borrowedBeast = collectionRef!.borrowBeast(id: id)!
103102
let beast = Beast(
104103
id: borrowedBeast.id,
105104
serialNumber: borrowedBeast.serialNumber,

pages/profile/[address].tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,8 @@ const Profile: NextPage = () => {
327327
}
328328
evolvableBeasts[element.beastTemplateID] = beastsOfSameTemplate
329329
}
330-
console.log(evolvableBeasts)
331330
setEvolvableBeasts(evolvableBeasts)
332331
getHunterScore()
333-
console.log("fetchUserBeasts()", mappedCollection)
334332
} catch (err) {
335333
console.log(err)
336334
}
@@ -357,7 +355,6 @@ const Profile: NextPage = () => {
357355
args: (arg: any, t: any) => [arg(walletAddress, t.Address)],
358356
})
359357
setSushiBalance(res)
360-
console.log("profile/[address].tsx: fetchSushi()")
361358
} catch (err) {
362359
console.log(err)
363360
}
@@ -384,7 +381,6 @@ const Profile: NextPage = () => {
384381
args: (arg: any, t: any) => [arg(walletAddress, t.Address)],
385382
})
386383
setEmptyPotionBottleBalance(res)
387-
console.log("profile/[address].tsx: fetchEmptyPotionBottle()")
388384
} catch (err) {
389385
console.log(err)
390386
}
@@ -411,7 +407,6 @@ const Profile: NextPage = () => {
411407
args: (arg: any, t: any) => [arg(walletAddress, t.Address)],
412408
})
413409
setPoopBalance(res)
414-
console.log("profile/[address].tsx: fetchPoop()")
415410
} catch (err) {
416411
console.log(err)
417412
}
@@ -486,7 +481,6 @@ const Profile: NextPage = () => {
486481
}
487482

488483
getPacks(mappedPacks)
489-
console.log("profile/[address].tsx: fetchUserPacks()")
490484
} catch (err) {
491485
console.log(err)
492486
}
@@ -505,7 +499,6 @@ const Profile: NextPage = () => {
505499
args: (arg: any, t: any) => [arg(walletAddress, t.Address)],
506500
})
507501
setHunterScore(res)
508-
console.log("profile/[address].tsx: getHunterScore()")
509502
} catch (error) {
510503
console.log(error)
511504
}
@@ -537,7 +530,6 @@ const Profile: NextPage = () => {
537530
personalDex[dexNumber] = image
538531
}
539532
setDexicon(personalDex)
540-
console.log("profile/[address].tsx: getPersonalDexicon()")
541533
} catch (error) {
542534
console.log(error)
543535
}
@@ -558,19 +550,17 @@ const Profile: NextPage = () => {
558550
`,
559551
args: (arg: any, t: any) => [arg(walletAddress, t.Address)],
560552
})
561-
console.log("Profile:" + res)
562553
//Resolve Profile
563554
setProfile(res)
564555
//Resolve Profile Picture
565-
let avatar = res.avatar
556+
let avatar = res?.avatar
566557
for (let key in profilePictures) {
567558
let element =
568559
profilePictures[key as unknown as keyof typeof profilePictures]
569560
if (avatar == element.image) {
570561
setProfilePicture(element.image)
571562
}
572563
}
573-
console.log("profile/[address].tsx: getProfile()")
574564
} catch (error) {
575565
console.log(error)
576566
}

0 commit comments

Comments
 (0)