Skip to content

Commit

Permalink
hotfix: optional chain dynamicAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Feb 12, 2025
1 parent 706b749 commit d7f15e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/pages/[guild]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { Center, Heading, Spinner } from "@chakra-ui/react"
import { AccessHub } from "components/[guild]/AccessHub"
import { GuildPageBanner } from "components/[guild]/GuildPageBanner"
import { GuildPageImageAndName } from "components/[guild]/GuildPageImageAndName"
import { JoinButton } from "components/[guild]/JoinButton"
import { JoinModalProvider } from "components/[guild]/JoinModal/JoinModalProvider"
import { MintGuildPinProvider } from "components/[guild]/Requirements/components/GuildCheckout/MintGuildPinContext"
import Roles from "components/[guild]/Roles"
Expand Down Expand Up @@ -110,14 +109,14 @@ const GuildPage = (): JSX.Element => {
<LayoutHeadline className="max-w-screen-xl pt-12">
<GuildPageImageAndName />

<div className="ml-auto flex gap-2">
{/* <div className="ml-auto flex gap-2">
{!isMember && <JoinButton />}
{isAdmin && isDetailed ? (
<DynamicAddSolutionsAndEditGuildButton />
) : (
isMember && <DynamicRecheckAccessesAndLeaveButton />
)}
</div>
</div> */}
</LayoutHeadline>

{(description || Object.keys(socialLinks ?? {}).length > 0) && (
Expand Down
2 changes: 1 addition & 1 deletion src/rewards/Token/EditTokenModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const EditTokenModal = ({

const multiplier = useMemo(() => {
const rp: any = rolePlatforms?.[0]
return rp ? rp.dynamicAmount.operation.params.multiplier : 1.0
return rp ? (rp.dynamicAmount?.operation.params.multiplier ?? 1.0) : 1.0
}, [rolePlatforms])

const toast = useToast()
Expand Down

0 comments on commit d7f15e2

Please sign in to comment.