Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(extension): #244: add DEX link #267

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
5 changes: 5 additions & 0 deletions .changeset/curvy-ties-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'chrome-extension': minor
---

Add link to the DEX after successful onboarding
1 change: 1 addition & 0 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bundle:prod": "NODE_OPTIONS=\"--import=./src/utils/webpack-register.js\" webpack --config webpack.prod-config.ts",
"clean": "rm -rfv dist beta-dist bin",
"dev": "NODE_ENV=testnet pnpm bundle:prod --watch --mode=development -d inline-source-map",
"dev:beta": "NODE_ENV=testnet pnpm bundle:beta --watch --mode=development -d inline-source-map",
"lint": "eslint src",
"test": "vitest run"
},
Expand Down
35 changes: 25 additions & 10 deletions apps/extension/src/routes/page/onboarding/success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,38 @@ import { SplashPage } from '@repo/ui/components/ui/splash-page';
import { useStore } from '../../../state';
import { getDefaultFrontend } from '../../../state/default-frontend';

const DEX_URL = 'https://dex.penumbra.zone';

export const OnboardingSuccess = () => {
const defaultFrontendUrl = useStore(getDefaultFrontend);

return (
<SplashPage title='Account created'>
<div className='grid gap-2 text-base font-bold'>
<p>Connect to a Penumbra frontend to deposit, transfer, stake or swap.</p>
<Button
variant='gradient'
onClick={() => {
window.open(defaultFrontendUrl, '_blank');
window.close();
}}
className='mt-4'
>
Visit web app
</Button>

<div className='flex flex-col gap-2 md:flex-row'>
<Button
variant='secondary'
onClick={() => {
window.open(defaultFrontendUrl, '_blank');
window.close();
}}
className='mt-4 grow md:w-1/2'
>
Visit web app
</Button>
<Button
variant='gradient'
onClick={() => {
window.open(DEX_URL, '_blank');
window.close();
}}
className='mt-4 grow md:w-1/2'
>
Visit DEX
</Button>
</div>
</div>
</SplashPage>
);
Expand Down