+
+ Review applications
+
+
+ Evaluate projects here.
-
-
-
-
- {`Ready to submit (${ReadyApplicationsToSubmit.length})`}
-
-
-
-
+
+
+
+
+
+ {`Ready to submit (${ReadyApplicationsToSubmit.length})`}
-
-
-
-
- {ReadyApplicationsToSubmit.length === 0 ? (
-
- Evaluations that are ready to be submitted onchain will appear here once
- reviewed. Manager supports multiple reviewers.
-
- ) : (
-
+
+
+
+
+
+
+ {ReadyApplicationsToSubmit.length === 0 ? (
+
+ Evaluations that are ready to be submitted onchain will appear here once reviewed.
+ Manager supports multiple reviewers.
+
+ ) : (
+
+ )}
diff --git a/src/primitives/Avatar/Avatar.tsx b/src/primitives/Avatar/Avatar.tsx
index 995d02d..feef152 100644
--- a/src/primitives/Avatar/Avatar.tsx
+++ b/src/primitives/Avatar/Avatar.tsx
@@ -40,12 +40,16 @@ export const Avatar = ({
variant = "default", // Default to default variant
}: AvatarProps) => {
const imageURL = useMemo(() => {
- return match({ ipfsCID, url, fallbackName })
- .with({ ipfsCID: P.nullish, url: P.nullish, fallbackName: P.nullish }, () => defaultImage)
- .with({ ipfsCID, url: P.string.length(0) }, ({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`)
- .with({ ipfsCID, url: P.nullish }, ({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`)
- .with({ ipfsCID: P.string.length(0), url }, ({ url }) => url)
- .with({ ipfsCID: P.nullish, url }, ({ url }) => url)
+ return match({ ipfsCID, url })
+ .with(
+ { ipfsCID: P.when((cid) => !cid || typeof cid !== "string"), url: P.nullish },
+ () => defaultImage,
+ )
+ .with({ ipfsCID: P.when((cid) => !cid || typeof cid !== "string"), url }, ({ url }) => url)
+ .with(
+ { ipfsCID: P.when((cid) => typeof cid === "string" && cid.length > 0), url: P.nullish },
+ ({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`,
+ )
.with(
{ ipfsCID: P.string.minLength(1), url: P.string.minLength(1) },
({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`,
diff --git a/src/primitives/BannerImage/BannerImage.tsx b/src/primitives/BannerImage/BannerImage.tsx
index 8d514d3..7c6216a 100644
--- a/src/primitives/BannerImage/BannerImage.tsx
+++ b/src/primitives/BannerImage/BannerImage.tsx
@@ -41,11 +41,15 @@ export const BannerImage = ({
}: BannerImageProps) => {
const imageURL = useMemo(() => {
return match({ ipfsCID, url })
- .with({ ipfsCID: P.nullish, url: P.nullish }, () => defaultImage)
- .with({ ipfsCID, url: P.string.length(0) }, ({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`)
- .with({ ipfsCID, url: P.nullish }, ({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`)
- .with({ ipfsCID: P.string.length(0), url }, ({ url }) => url)
- .with({ ipfsCID: P.nullish, url }, ({ url }) => url)
+ .with(
+ { ipfsCID: P.when((cid) => !cid || typeof cid !== "string"), url: P.nullish },
+ () => defaultImage,
+ )
+ .with({ ipfsCID: P.when((cid) => !cid || typeof cid !== "string"), url }, ({ url }) => url)
+ .with(
+ { ipfsCID: P.when((cid) => typeof cid === "string" && cid.length > 0), url: P.nullish },
+ ({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`,
+ )
.with(
{ ipfsCID: P.string.minLength(1), url: P.string.minLength(1) },
({ ipfsCID }) => `${ipfsBaseURL}${ipfsCID}`,