Skip to content

Commit

Permalink
Add back arrow to mobile deposit screen
Browse files Browse the repository at this point in the history
  • Loading branch information
youngkidwarrior committed Sep 23, 2024
1 parent 9822f82 commit 8900bce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
6 changes: 2 additions & 4 deletions apps/next/pages/deposit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HomeLayout } from 'app/features/home/layout.web'
import Head from 'next/head'
import { userProtectedGetSSP } from 'utils/userProtected'
import type { NextPageWithLayout } from '../_app'
import { ButtonOption, TopNav } from 'app/components/TopNav'
import { TopNav } from 'app/components/TopNav'

export const Page: NextPageWithLayout = () => {
return (
Expand All @@ -19,9 +19,7 @@ export const Page: NextPageWithLayout = () => {
export const getServerSideProps = userProtectedGetSSP()

Page.getLayout = (children) => (
<HomeLayout TopNav={<TopNav header="Deposit" button={ButtonOption.PROFILE} />}>
{children}
</HomeLayout>
<HomeLayout TopNav={<TopNav header="Deposit" />}>{children}</HomeLayout>
)

export default Page
5 changes: 3 additions & 2 deletions packages/app/components/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ export function TopNav({

push(`/${newPath}`)
}

const isSubRoute = (!noSubroute && parts.length > 1) || path.includes('/secret-shop')
//@todo Refactor this so we can put back arrows on screens that need it
const isSubRoute =
(!noSubroute && parts.length > 1) || path.includes('/secret-shop') || path.includes('/deposit')

const renderButton = () => {
switch (true) {
Expand Down
14 changes: 2 additions & 12 deletions packages/app/features/deposit/screen.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
import { H4, XStack, YStack, type YStackProps } from '@my/ui'
import { H4, XStack, YStack } from '@my/ui'
import { DepositAddress } from 'app/components/DepositAddress'
import { useSendAccount } from 'app/utils/send-accounts'

/**
* Deposit screen shows the various options for depositing funds.
* - Web3 Wallet (window.ethereum)
* - Coinbase Pay
* - ???
*/
export function DepositScreen() {
return <DepositWelcome />
}

export function DepositWelcome(props: YStackProps) {
return (
<YStack mt="$4" mx="auto" width={'100%'} $sm={{ maxWidth: 600 }} {...props}>
<YStack mt="$4" mx="auto" width={'100%'} $sm={{ maxWidth: 600 }}>
<YStack w={'100%'}>
<DepositAddressWrapper />
</YStack>
Expand Down

0 comments on commit 8900bce

Please sign in to comment.