Skip to content

Commit

Permalink
Temp: add optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
TomiOhl committed Nov 6, 2024
1 parent 7c385a4 commit 58cb408
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import { useRequirementContext } from "./RequirementContext"

function requirementTypeToPlatformName(type: RequirementType): PlatformName {
if (type === "ALLOWLIST_EMAIL") return "EMAIL"
if (REQUIREMENTS[type].types[0].startsWith("TWITTER")) return "TWITTER_V1"
if (REQUIREMENTS[type].types[0].startsWith("WORLD_ID")) return "WORLD_ID"
return REQUIREMENTS[type].types[0].split("_")[0] as PlatformName
if (REQUIREMENTS[type]?.types[0]?.startsWith("TWITTER")) return "TWITTER_V1"
if (REQUIREMENTS[type]?.types[0]?.startsWith("WORLD_ID")) return "WORLD_ID"
return REQUIREMENTS[type]?.types[0]?.split("_")[0] as PlatformName
}

const RequirementConnectButton = (props: ButtonProps) => {
Expand Down

0 comments on commit 58cb408

Please sign in to comment.