Skip to content

Commit

Permalink
feat: add container to StartProfile (#1411)
Browse files Browse the repository at this point in the history
* feat: add container to StartProfile

* feat: add avatar to form

* feat: add avatar upload and error message

* feat: add confetti effect on create profile

* feat: add sfx to confetti

* feat: add farcaster autofill, fix submit by avatar

* docs: rename credits file

* feat: redirect on profile creation

* chore: replace route instead push

* fix: address farcaster linking

* chore: update zod message

* fix: make avatar size properly image, disable

* fix: align code to suggestions

* feat: reset onboarding if not signed in
  • Loading branch information
dominik-stumpf authored Jul 30, 2024
1 parent cfbf8f1 commit ca56779
Show file tree
Hide file tree
Showing 12 changed files with 415 additions and 93 deletions.
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ const nextConfig = {
{
hostname: "og.link3.to",
},
{
hostname: "imagedelivery.net"
}
],
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
Expand Down
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"qrcode.react": "^3.1.0",
"randombytes": "^2.1.0",
"react": "^18.2.0",
"react-canvas-confetti": "^2.0.7",
"react-device-detect": "^2.2.2",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
Expand Down
1 change: 1 addition & 0 deletions public/sfx/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"./confetti-party-popper.mp3" : Attribution 4.0 International (CC BY 4.0) - Vilkas Sound
Binary file added public/sfx/confetti-party-popper.mp3
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
"use client"

import { walletSelectorModalAtom } from "@/components/Providers/atoms"
import { useWeb3ConnectionManager } from "@/components/Web3ConnectionManager/hooks/useWeb3ConnectionManager"
import { Button } from "@/components/ui/Button"
import { cardClassName } from "@/components/ui/Card"
import { cn } from "@/lib/utils"
import { useState } from "react"
import { useSetAtom } from "jotai"
import { useEffect, useState } from "react"
import { SUBSCRIPTIONS } from "../constants"
import { ChainData, DispatchChainAction, OnboardingChain } from "../types"
import { ChoosePass } from "./ChoosePass"
Expand All @@ -19,7 +22,17 @@ const chains: OnboardingChain[] = [
] as const

export const OnboardingDriver = () => {
const [chainIndex, setChainIndex] = useState(0)
const [chainIndex, setChainIndex] = useState(3)
const { address } = useWeb3ConnectionManager()
const setIsWalletSelectorModalOpen = useSetAtom(walletSelectorModalAtom)

useEffect(() => {
if (!address) {
setChainIndex(0)
setIsWalletSelectorModalOpen(true)
}
}, [address, setIsWalletSelectorModalOpen])

// TODO: remove default chosen subscription, as it is only there for debug
// purposes
const [chainData, setChainData] = useState<Partial<ChainData>>({
Expand Down
Loading

0 comments on commit ca56779

Please sign in to comment.