From edc0cd4cfba11bdbaee6e2452012605e84ec1b6b Mon Sep 17 00:00:00 2001 From: Crisgarner <@crisgarner> Date: Thu, 5 Sep 2024 10:23:56 -0600 Subject: [PATCH] feat: fixes and improvements --- .../features/ballot/components/ProjectAvatarWithName.tsx | 2 +- .../src/features/projects/components/ProjectAvatar.tsx | 3 +-- .../interface/src/features/projects/components/Projects.tsx | 2 +- packages/interface/src/hooks/useProfile.ts | 6 ++---- packages/interface/src/pages/signup/index.tsx | 4 ++-- packages/interface/src/server/api/routers/profile.ts | 2 +- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/interface/src/features/ballot/components/ProjectAvatarWithName.tsx b/packages/interface/src/features/ballot/components/ProjectAvatarWithName.tsx index 1cfd491c..cd41c4fd 100644 --- a/packages/interface/src/features/ballot/components/ProjectAvatarWithName.tsx +++ b/packages/interface/src/features/ballot/components/ProjectAvatarWithName.tsx @@ -23,7 +23,7 @@ export const ProjectAvatarWithName = ({ return ( - +
{projects?.[0]?.name}
diff --git a/packages/interface/src/features/projects/components/ProjectAvatar.tsx b/packages/interface/src/features/projects/components/ProjectAvatar.tsx index 22bba644..1dcacd83 100644 --- a/packages/interface/src/features/projects/components/ProjectAvatar.tsx +++ b/packages/interface/src/features/projects/components/ProjectAvatar.tsx @@ -1,11 +1,10 @@ import { type ComponentProps } from "react"; -import { type Address } from "viem"; import { Avatar } from "~/components/ui/Avatar"; import { useProfileWithMetadata } from "~/hooks/useProfile"; export interface IProjectAvatarProps extends ComponentProps { - profileId?: Address; + profileId?: string; url?: string; } diff --git a/packages/interface/src/features/projects/components/Projects.tsx b/packages/interface/src/features/projects/components/Projects.tsx index 2b07ac77..f58e53e9 100644 --- a/packages/interface/src/features/projects/components/Projects.tsx +++ b/packages/interface/src/features/projects/components/Projects.tsx @@ -92,7 +92,7 @@ export const Projects = (): JSX.Element => {
- Projects + Beaches
diff --git a/packages/interface/src/hooks/useProfile.ts b/packages/interface/src/hooks/useProfile.ts index a5072186..844c548d 100644 --- a/packages/interface/src/hooks/useProfile.ts +++ b/packages/interface/src/hooks/useProfile.ts @@ -1,5 +1,3 @@ -import { type Address } from "viem"; - import { api } from "~/utils/api"; import type { UseTRPCQueryResult } from "@trpc/react-query/shared"; @@ -7,12 +5,12 @@ import type { Attestation } from "~/utils/types"; import { useMetadata } from "./useMetadata"; -export function useProfile(id?: Address): UseTRPCQueryResult { +export function useProfile(id?: string): UseTRPCQueryResult { return api.profile.get.useQuery({ id: String(id) }, { enabled: Boolean(id) }); } export function useProfileWithMetadata( - id?: Address, + id?: string, ): UseTRPCQueryResult<{ profileImageUrl: string; bannerImageUrl: string }, unknown> { const profile = useProfile(id); diff --git a/packages/interface/src/pages/signup/index.tsx b/packages/interface/src/pages/signup/index.tsx index adb346cb..f2d74451 100644 --- a/packages/interface/src/pages/signup/index.tsx +++ b/packages/interface/src/pages/signup/index.tsx @@ -30,7 +30,7 @@ const SignupPage = (): JSX.Element => { - {config.roundId.toUpperCase()} + By MUQA

@@ -51,7 +51,7 @@ const SignupPage = (): JSX.Element => { {isConnected && isRegistered && appState === EAppState.VOTING && ( )} diff --git a/packages/interface/src/server/api/routers/profile.ts b/packages/interface/src/server/api/routers/profile.ts index bf36f11e..339875d6 100644 --- a/packages/interface/src/server/api/routers/profile.ts +++ b/packages/interface/src/server/api/routers/profile.ts @@ -10,7 +10,7 @@ export const profileRouter = createTRPCRouter({ get: publicProcedure.input(z.object({ id: z.string() })).query(async ({ input }) => fetchAttestations([eas.schemas.metadata], { where: { - recipient: { in: [input.id] }, + id: { in: [input.id] }, ...createDataFilter("type", "bytes32", "profile"), }, }).then(([attestation]) => {