diff --git a/packages/interface/public/logo-muqa.png b/packages/interface/public/logo-muqa.png new file mode 100644 index 00000000..c9aa3d03 Binary files /dev/null and b/packages/interface/public/logo-muqa.png differ diff --git a/packages/interface/public/logo.png b/packages/interface/public/logo.png new file mode 100644 index 00000000..c71e7762 Binary files /dev/null and b/packages/interface/public/logo.png differ diff --git a/packages/interface/public/round-logo.svg b/packages/interface/public/round-logo.svg deleted file mode 100644 index d8bb29c7..00000000 --- a/packages/interface/public/round-logo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/packages/interface/src/components/ImageUpload.tsx b/packages/interface/src/components/ImageUpload.tsx index a914a0fb..14147e20 100644 --- a/packages/interface/src/components/ImageUpload.tsx +++ b/packages/interface/src/components/ImageUpload.tsx @@ -14,7 +14,7 @@ export interface IImageUploadProps extends ComponentProps<"img"> { export const ImageUpload = ({ name = "", - maxSize = 1024 * 1024, // 1 MB + maxSize = 2048 * 2048, // 2 MB className, }: IImageUploadProps): JSX.Element => { const ref = useRef(null); diff --git a/packages/interface/src/components/JoinButton.tsx b/packages/interface/src/components/JoinButton.tsx index cddb616c..4589ac3c 100644 --- a/packages/interface/src/components/JoinButton.tsx +++ b/packages/interface/src/components/JoinButton.tsx @@ -13,7 +13,6 @@ export const JoinButton = (): JSX.Element => { const onError = useCallback(() => toast.error("Signup error"), []); const handleSignup = useCallback(() => onSignup(onError), [onSignup, onError]); - return (
{appState === EAppState.VOTING && !isEligibleToVote && ( diff --git a/packages/interface/src/components/RoundInfo.tsx b/packages/interface/src/components/RoundInfo.tsx index 75c9f06f..abb29699 100644 --- a/packages/interface/src/components/RoundInfo.tsx +++ b/packages/interface/src/components/RoundInfo.tsx @@ -1,17 +1,12 @@ -import Image from "next/image"; - import { Heading } from "~/components/ui/Heading"; -import { config } from "~/config"; export const RoundInfo = (): JSX.Element => (
-

Round

+

MUQA

- {config.roundLogo && round logo} - - {config.roundId} + Beach Contest
diff --git a/packages/interface/src/components/ui/Avatar.tsx b/packages/interface/src/components/ui/Avatar.tsx index ddad7f49..c443278b 100644 --- a/packages/interface/src/components/ui/Avatar.tsx +++ b/packages/interface/src/components/ui/Avatar.tsx @@ -14,6 +14,7 @@ export const Avatar = createComponent( sm: "w-12 h-12 rounded-md", md: "w-16 h-16 rounded-md", lg: "w-40 h-40 rounded-3xl", + xl: "w-80 h-80 rounded-4xl", }, rounded: { full: "rounded-full", diff --git a/packages/interface/src/config.ts b/packages/interface/src/config.ts index ffe5dc80..8b54702a 100644 --- a/packages/interface/src/config.ts +++ b/packages/interface/src/config.ts @@ -69,7 +69,7 @@ export const getRPCURL = (): string | undefined => { }; export const config = { - logoUrl: "/Logo.svg", + logoUrl: "/logo.svg", pageSize: 3 * 4, // TODO: temp solution until we come up with solid one // https://github.com/privacy-scaling-explorations/maci-platform/issues/31 diff --git a/packages/interface/src/contexts/Maci.tsx b/packages/interface/src/contexts/Maci.tsx index d84003d6..9e4ccf65 100644 --- a/packages/interface/src/contexts/Maci.tsx +++ b/packages/interface/src/contexts/Maci.tsx @@ -104,7 +104,6 @@ export const MaciProvider: React.FC = ({ children }: MaciProv // for Semaphore it will be a proof being part of the group useEffect(() => { setIsLoading(true); - // add custom logic for other gatekeepers here switch (gatekeeperTrait) { case GatekeeperTrait.Semaphore: @@ -145,6 +144,9 @@ export const MaciProvider: React.FC = ({ children }: MaciProv }); setIsLoading(false); break; + case GatekeeperTrait.FreeForAll: + setIsLoading(false); + break; default: break; } @@ -157,7 +159,7 @@ export const MaciProvider: React.FC = ({ children }: MaciProv // for instance with semaphore const isEligibleToVote = useMemo( () => gatekeeperTrait && (gatekeeperTrait === GatekeeperTrait.FreeForAll || Boolean(sgData)) && Boolean(address), - [sgData, address], + [sgData, address, gatekeeperTrait], ); // on load get the key pair from local storage and set the signature message @@ -192,7 +194,6 @@ export const MaciProvider: React.FC = ({ children }: MaciProv if (!address) { return; } - const signature = await signMessageAsync({ message: signatureMessage }); const newSemaphoreIdentity = new Identity(signature); const userKeyPair = genKeyPair({ seed: BigInt(signature) }); diff --git a/packages/interface/src/features/applications/components/ApplicationButtons.tsx b/packages/interface/src/features/applications/components/ApplicationButtons.tsx index 5701ec5b..a94c5f3e 100644 --- a/packages/interface/src/features/applications/components/ApplicationButtons.tsx +++ b/packages/interface/src/features/applications/components/ApplicationButtons.tsx @@ -8,7 +8,6 @@ import { Spinner } from "~/components/ui/Spinner"; import { useIsCorrectNetwork } from "~/hooks/useIsCorrectNetwork"; import type { Application } from "../types"; -import type { ImpactMetrix, ContributionLink, FundingSource } from "~/features/projects/types"; export enum EApplicationStep { PROFILE, @@ -39,62 +38,19 @@ export const ApplicationButtons = ({ const form = useFormContext(); - const [ - name, - bio, - payoutAddress, - websiteUrl, - profileImageUrl, - bannerImageUrl, - contributionDescription, - impactDescription, - impactCategory, - contributionLinks, - fundingSources, - ] = useMemo( - () => - form.watch([ - "name", - "bio", - "payoutAddress", - "websiteUrl", - "profileImageUrl", - "bannerImageUrl", - "contributionDescription", - "impactDescription", - "impactCategory", - "contributionLinks", - "fundingSources", - ]), + const [name, bio, profileImageUrl, bannerImageUrl, activitiesDescription] = useMemo( + () => form.watch(["name", "bio", "websiteUrl", "profileImageUrl", "bannerImageUrl", "activitiesDescription"]), [form], ); - const checkLinks = ( - links: Pick[] | undefined, - ): boolean => - links === undefined || links.every((link) => link.description !== undefined && link.description.length > 0); - const checkStepComplete = (): boolean => { if (step === EApplicationStep.PROFILE) { - return ( - bannerImageUrl !== undefined && - profileImageUrl !== undefined && - bio.length > 0 && - name.length > 0 && - payoutAddress.length > 0 && - websiteUrl.length > 0 - ); + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + return bannerImageUrl !== undefined && profileImageUrl !== undefined && bio.length > 0 && name.length > 0; } if (step === EApplicationStep.ADVANCED) { - return ( - impactCategory !== undefined && - impactCategory.length > 0 && - contributionDescription.length > 0 && - impactDescription.length > 0 && - checkLinks(contributionLinks) && - checkLinks(fundingSources) - ); + return (activitiesDescription ?? "").length > 0; } return true; diff --git a/packages/interface/src/features/applications/components/ApplicationForm.tsx b/packages/interface/src/features/applications/components/ApplicationForm.tsx index 70b6bcff..e36c1f76 100644 --- a/packages/interface/src/features/applications/components/ApplicationForm.tsx +++ b/packages/interface/src/features/applications/components/ApplicationForm.tsx @@ -6,16 +6,15 @@ import { toast } from "sonner"; import { useAccount } from "wagmi"; import { ImageUpload } from "~/components/ImageUpload"; -import { FieldArray, Form, FormControl, FormSection, Select, Textarea } from "~/components/ui/Form"; +import { Form, FormControl, FormSection, Textarea } from "~/components/ui/Form"; import { Input } from "~/components/ui/Input"; import { useIsCorrectNetwork } from "~/hooks/useIsCorrectNetwork"; import { useCreateApplication } from "../hooks/useCreateApplication"; -import { ApplicationSchema, contributionTypes, fundingSourceTypes } from "../types"; +import { ApplicationSchema } from "../types"; import { ApplicationButtons, EApplicationStep } from "./ApplicationButtons"; import { ApplicationSteps } from "./ApplicationSteps"; -import { ImpactTags } from "./ImpactTags"; import { ReviewApplicationDetails } from "./ReviewApplicationDetails"; export const ApplicationForm = (): JSX.Element => { @@ -29,7 +28,7 @@ export const ApplicationForm = (): JSX.Element => { /** * There are 3 steps for creating an application. - * The first step is to set the project introduction (profile); + * The first step is to set the beach introduction (profile); * the second step is to set the contributions, impacts, and funding sources (advanced); * the last step is to review the input values, allow editing by going back to previous steps (review). */ @@ -69,9 +68,6 @@ export const ApplicationForm = (): JSX.Element => {
{ create.mutate(application); @@ -79,48 +75,32 @@ export const ApplicationForm = (): JSX.Element => { > - - + + -