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: embedded mira swap #243

Draft
wants to merge 2 commits into
base: develop
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
2 changes: 1 addition & 1 deletion apps/frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const CSP_HEADER = `
font-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com https://static.swaylend.com https://testnet-swaylend.b-cdn.net;
object-src 'none';
base-uri 'self';
frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org;
frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org https://mira.ly/;
form-action 'self';
frame-ancestors 'none';
upgrade-insecure-requests;
Expand Down
17 changes: 17 additions & 0 deletions apps/frontend/src/app/(core)/swap/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Swap',
};

export default async function Page() {
return (
<div className="w-full h-full p-4">
<iframe
title="mira.ly"
className="w-full h-screen rounded-2xl border-0 scrollbar-none"
src="https://mira.ly/"
/>
</div>
);
}
22 changes: 22 additions & 0 deletions apps/frontend/src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ export const Navbar = ({ mobile = false }: { mobile?: boolean }) => {
</div>
</div>
</DropdownMenuItem>
<DropdownMenuItem>
<Link href="/swap" className="w-full">
<div className="w-full flex items-center justify-between text-md font-medium text-lavender py-1 px-0.5 gap-x-2 cursor-pointer hover:underline">
Embedded
</div>
</Link>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>
Expand Down Expand Up @@ -284,6 +291,21 @@ export const Navbar = ({ mobile = false }: { mobile?: boolean }) => {
Dashboard
</div>
</Link>
<Link
href="/swap"
onMouseDown={() => setOpen(false)}
prefetch={false}
>
<div
className={cn(
pathname === '/swap' ? 'text-primary' : 'text-lavender',
pathname !== '/swap' && 'hover:text-lavender/80',
'flex font-bold text-xl items-center gap-x-2 h-full'
)}
>
Swap
</div>
</Link>
{NAVBAR_LINKS.map(({ href, label }) => {
if (mobile && href === '/markets') return null;
return (
Expand Down