Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified public/logo-favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 39 additions & 53 deletions public/peanutman-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/app/favicon.ico
Binary file not shown.
92 changes: 39 additions & 53 deletions src/assets/peanut/peanutman-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions src/components/Create/Create.consts.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react'
import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk'
import React from 'react'

import * as createLinkViews from './Link'

export type CreateType = 'link' | 'direct' | 'email_link' | 'sms_link' | undefined

export type CreateScreens = 'INITIAL' | 'INPUT' | 'CONFIRM' | 'SUCCESS'
// note: removed 'INITIAL' view temporarily
export type CreateScreens = 'INPUT' | 'CONFIRM' | 'SUCCESS'

export interface IAttachmentOptions {
fileUrl: string | undefined
Expand All @@ -19,7 +20,7 @@ export interface ICreateScreenState {
}

export const INIT_VIEW_STATE: ICreateScreenState = {
screen: 'INITIAL',
screen: 'INPUT',
idx: 0,
}
export interface ICreateScreenProps {
Expand Down Expand Up @@ -73,10 +74,11 @@ export interface ICreateScreenProps {
setUsdValue: (value: string | undefined) => void
}

export const CREATE_SCREEN_FLOW: CreateScreens[] = ['INITIAL', 'INPUT', 'CONFIRM', 'SUCCESS']
export const CREATE_SCREEN_FLOW: CreateScreens[] = ['INPUT', 'CONFIRM', 'SUCCESS']

export const CREATE_SCREEN_MAP: { [key in CreateScreens]: { comp: React.FC<any> } } = {
INITIAL: { comp: createLinkViews.CreateLinkInitialView },
// todo: revisit when have more clarificitaion on flow
// INITIAL: { comp: createLinkViews.CreateLinkInitialView },
INPUT: { comp: createLinkViews.CreateLinkInputView },
CONFIRM: { comp: createLinkViews.CreateLinkConfirmView },
SUCCESS: { comp: createLinkViews.CreateLinkSuccessView },
Expand Down
10 changes: 5 additions & 5 deletions src/components/Create/Create.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use client'

import { createElement, useContext, useEffect, useState } from 'react'
import { interfaces as peanutInterfaces } from '@squirrel-labs/peanut-sdk'
import { createElement, useContext, useEffect, useState } from 'react'

import * as _consts from './Create.consts'
import * as context from '@/context'
import { useBalance } from '@/hooks/useBalance'
import * as utils from '@/utils'
import { useAccount } from 'wagmi'
import SafeAppsSDK from '@safe-global/safe-apps-sdk'
import { useBalance } from '@/hooks/useBalance'
import { useAccount } from 'wagmi'
import * as _consts from './Create.consts'

export const Create = () => {
const [step, setStep] = useState<_consts.ICreateScreenState>(_consts.INIT_VIEW_STATE)
Expand Down Expand Up @@ -121,7 +121,7 @@ export const Create = () => {
}, [address])

return (
<div className="card max-w-lg">
<div className="card">
{createElement(_consts.CREATE_SCREEN_MAP[step.screen].comp, {
onPrev: handleOnPrev,
onNext: handleOnNext,
Expand Down
Loading