diff --git a/public/models/basic_guild_pass-transformed.glb b/public/models/basic_guild_pass-transformed.glb new file mode 100644 index 0000000000..294dde942f Binary files /dev/null and b/public/models/basic_guild_pass-transformed.glb differ diff --git a/public/models/gold_guild_pass-transformed.glb b/public/models/gold_guild_pass-transformed.glb new file mode 100644 index 0000000000..93e317701e Binary files /dev/null and b/public/models/gold_guild_pass-transformed.glb differ diff --git a/src/app/(marketing)/create-profile/_components/BasicGuildPass.tsx b/src/app/(marketing)/create-profile/_components/BasicGuildPass.tsx new file mode 100644 index 0000000000..caae702ff3 --- /dev/null +++ b/src/app/(marketing)/create-profile/_components/BasicGuildPass.tsx @@ -0,0 +1,52 @@ +/* +Auto-generated by: https://github.com/pmndrs/gltfjsx +Command: npx gltfjsx@6.5.0 basic_guild_pass.glb --transform --types +Files: basic_guild_pass.glb [10.27MB] > /home/senkora/projects/guild.xyz/public/models/basic_guild_pass-transformed.glb [551.1KB] (95%) +*/ + +import { useGLTF } from "@react-three/drei" +import * as THREE from "three" +import { GLTF } from "three-stdlib" + +type GLTFResult = GLTF & { + nodes: { + Curve: THREE.Mesh + Curve001: THREE.Mesh + Curve003: THREE.Mesh + } + materials: { + SVGMat: THREE.MeshStandardMaterial + "Material.001": THREE.MeshStandardMaterial + "Material.002": THREE.MeshStandardMaterial + } + // animations: GLTFAction[] +} + +export function Model(props: JSX.IntrinsicElements["group"]) { + const { nodes, materials } = useGLTF( + "models/basic_guild_pass-transformed.glb" + ) as GLTFResult + return ( + + + + + + ) +} + +useGLTF.preload("models/basic_guild_pass-transformed.glb") diff --git a/src/app/(marketing)/create-profile/_components/ChoosePass.tsx b/src/app/(marketing)/create-profile/_components/ChoosePass.tsx index 67d7db14aa..b6fc53bfa5 100644 --- a/src/app/(marketing)/create-profile/_components/ChoosePass.tsx +++ b/src/app/(marketing)/create-profile/_components/ChoosePass.tsx @@ -44,7 +44,7 @@ export const ChoosePass: OnboardingChain = ({ dispatchChainAction }) => {
- {" "} +

{title}

@@ -89,7 +89,7 @@ export const ChoosePass: OnboardingChain = ({ dispatchChainAction }) => { >
- +

{title}

diff --git a/src/app/(marketing)/create-profile/_components/ClaimPass.tsx b/src/app/(marketing)/create-profile/_components/ClaimPass.tsx index 6f105ac7cb..950bceb500 100644 --- a/src/app/(marketing)/create-profile/_components/ClaimPass.tsx +++ b/src/app/(marketing)/create-profile/_components/ClaimPass.tsx @@ -34,7 +34,7 @@ export const ClaimPass: OnboardingChain = ({ dispatchChainAction }) => { return (
- +

Claim your Guild Pass and begin an epic adventure! diff --git a/src/app/(marketing)/create-profile/_components/GoldGuildPass.tsx b/src/app/(marketing)/create-profile/_components/GoldGuildPass.tsx new file mode 100644 index 0000000000..18daaec875 --- /dev/null +++ b/src/app/(marketing)/create-profile/_components/GoldGuildPass.tsx @@ -0,0 +1,52 @@ +/* +Auto-generated by: https://github.com/pmndrs/gltfjsx +Command: npx gltfjsx@6.5.0 gold_guild_pass.glb --transform --types +Files: gold_guild_pass.glb [10.27MB] > /home/senkora/projects/guild.xyz/public/models/gold_guild_pass-transformed.glb [551.06KB] (95%) +*/ + +import { useGLTF } from "@react-three/drei" +import * as THREE from "three" +import { GLTF } from "three-stdlib" + +type GLTFResult = GLTF & { + nodes: { + Curve: THREE.Mesh + Curve001: THREE.Mesh + Curve003: THREE.Mesh + } + materials: { + "Material.003": THREE.MeshStandardMaterial + "Material.001": THREE.MeshStandardMaterial + "Material.004": THREE.MeshStandardMaterial + } + // animations: GLTFAction[]nimations: GLTFAction[] +} + +export function Model(props: JSX.IntrinsicElements["group"]) { + const { nodes, materials } = useGLTF( + "models/gold_guild_pass-transformed.glb" + ) as GLTFResult + return ( + + + + + + ) +} + +useGLTF.preload("models/gold_guild_pass-transformed.glb") diff --git a/src/app/(marketing)/create-profile/_components/GuildPassScene.tsx b/src/app/(marketing)/create-profile/_components/GuildPassScene.tsx index 589ba3a311..cf7be14d71 100644 --- a/src/app/(marketing)/create-profile/_components/GuildPassScene.tsx +++ b/src/app/(marketing)/create-profile/_components/GuildPassScene.tsx @@ -1,19 +1,35 @@ "use client" -import { Float } from "@react-three/drei" -import { Canvas, ThreeElements } from "@react-three/fiber" +import { Environment, Float } from "@react-three/drei" +import { Canvas } from "@react-three/fiber" +import { FunctionComponent } from "react" import * as THREE from "three" +import { SUBSCRIPTIONS } from "../constants" +import { Model as BasicModel } from "./BasicGuildPass" +import { Model as GoldModel } from "./GoldGuildPass" -function GuildPass(props: ThreeElements["mesh"]) { - return ( - - - - - ) +type SceneVariant = (typeof SUBSCRIPTIONS)[number]["title"] + +function SinglePass() { + return +} + +function BundlePass() { + return +} + +function LifetimePass() { + return +} + +const Variants: Record = { + "Single Pass": SinglePass, + "Bundle Pass": BundlePass, + "Lifetime Pass": LifetimePass, } -export const GuildPassScene = () => { +export const GuildPassScene = ({ sceneVariant }: { sceneVariant: SceneVariant }) => { + const Variant = Variants[sceneVariant] return ( @@ -26,8 +42,9 @@ export const GuildPassScene = () => { /> - + + ) } diff --git a/src/app/(marketing)/create-profile/_components/OnboardingDriver.tsx b/src/app/(marketing)/create-profile/_components/OnboardingDriver.tsx index 59dccc928c..926ee069f8 100644 --- a/src/app/(marketing)/create-profile/_components/OnboardingDriver.tsx +++ b/src/app/(marketing)/create-profile/_components/OnboardingDriver.tsx @@ -3,7 +3,7 @@ import { useWeb3ConnectionManager } from "@/components/Web3ConnectionManager/hoo import { Button } from "@/components/ui/Button" import { cardClassName } from "@/components/ui/Card" import { cn } from "@/lib/utils" -import { useEffect, useState } from "react" +import { useState } from "react" import { SUBSCRIPTIONS } from "../constants" import { ChainData, DispatchChainAction, OnboardingChain } from "../types" import { ChoosePass } from "./ChoosePass" @@ -19,14 +19,14 @@ const chains: OnboardingChain[] = [ ] as const export const OnboardingDriver = () => { - const [chainIndex, setChainIndex] = useState(3) + const [chainIndex, setChainIndex] = useState(1) const { address } = useWeb3ConnectionManager() - useEffect(() => { - if (!address) { - setChainIndex(0) - } - }, [address]) + // useEffect(() => { + // if (!address) { + // setChainIndex(0) + // } + // }, [address]) // TODO: remove default chosen subscription, as it is only there for debug // purposes diff --git a/src/app/(marketing)/create-profile/_components/PurchasePass.tsx b/src/app/(marketing)/create-profile/_components/PurchasePass.tsx index f9dfe5598f..cc9c4be046 100644 --- a/src/app/(marketing)/create-profile/_components/PurchasePass.tsx +++ b/src/app/(marketing)/create-profile/_components/PurchasePass.tsx @@ -39,7 +39,7 @@ export const PurchasePass: OnboardingChain = ({ className="size-full" /> ) : ( - + )}

diff --git a/src/app/(marketing)/create-profile/_components/StartProfile.tsx b/src/app/(marketing)/create-profile/_components/StartProfile.tsx index 3a0f974276..195d3f210a 100644 --- a/src/app/(marketing)/create-profile/_components/StartProfile.tsx +++ b/src/app/(marketing)/create-profile/_components/StartProfile.tsx @@ -14,8 +14,7 @@ import { import { Input } from "@/components/ui/Input" import { useToast } from "@/components/ui/hooks/useToast" import { cn } from "@/lib/utils" -import { profileSchema } from "@/lib/validations/profileSchema" -import { Schemas } from "@guildxyz/types" +import { Schemas, schemas } from "@guildxyz/types" import { zodResolver } from "@hookform/resolvers/zod" import { Spinner, UploadSimple, User } from "@phosphor-icons/react" import { ArrowRight } from "@phosphor-icons/react/dist/ssr" @@ -54,7 +53,7 @@ export const StartProfile: OnboardingChain = () => { }, [farcasterProfile]) const form = useForm({ - resolver: zodResolver(profileSchema), + resolver: zodResolver(schemas.ProfileCreationSchema), defaultValues: { name: "", username: "", diff --git a/src/v2/lib/validations/profileSchema.ts b/src/v2/lib/validations/profileSchema.ts deleted file mode 100644 index db17dd94c1..0000000000 --- a/src/v2/lib/validations/profileSchema.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { z } from "zod" - -export const profileSchema = z.object({ - name: z - .string() - .max(100, { message: "Name cannot exceed 100 characters" }) - .optional(), - username: z - .string() - .min(1, { message: "Username is required" }) - .max(100, { message: "Username cannot exceed 100 characters" }) - .superRefine((value, ctx) => { - const pattern = /^[\w\-.]+$/ - const isValid = pattern.test(value) - if (!isValid) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: - "Username must only contain either alphanumeric, hyphen, underscore or dot characters", - }) - } - }), - bio: z - .string() - .max(1000, { message: "Bio cannot exceed 1000 characters" }) - .optional(), - profileImageUrl: z - .string() - .url({ message: "Profile image must be a valid URL" }) - .max(500, { message: "Profile image URL cannot exceed 500 characters" }) - .optional(), - backgroundImageUrl: z - .string() - .url({ message: "Background image must be a valid URL" }) - .max(500, { message: "Profile image URL cannot exceed 500 characters" }) - .optional(), -})