diff --git a/src/requirements/Galaxy/GalaxyRequirement.tsx b/src/requirements/Galaxy/GalaxyRequirement.tsx index 937b073af5..4176d28d8d 100644 --- a/src/requirements/Galaxy/GalaxyRequirement.tsx +++ b/src/requirements/Galaxy/GalaxyRequirement.tsx @@ -1,4 +1,4 @@ -import { Link, Text } from "@chakra-ui/react" +import { Anchor } from "@/components/ui/Anchor" import { Requirement, RequirementProps, @@ -8,42 +8,43 @@ import { DataBlock } from "components/common/DataBlock" import { useGalaxyCampaign } from "./hooks/useGalaxyCampaigns" const GalaxyRequirement = (props: RequirementProps): JSX.Element => { - const requirement = useRequirementContext() + const requirement = useRequirementContext<"GALAXY" | "GALAXY_PARTICIPATION">() - const { campaign, isLoading } = useGalaxyCampaign(requirement?.data?.galaxyId) + const { campaign, isLoading } = useGalaxyCampaign(requirement.data.galaxyId) return ( - + {requirement.type === "GALAXY_PARTICIPATION" ? "Participate in the " : "Hold a(n) "} - + {!campaign || isLoading ? ( {requirement.data.galaxyId} ) : ( - {campaign.name} - + )} - + {requirement.type === "GALAXY_PARTICIPATION" ? " Galxe campaign" : " Galxe NFT"} - + ) }