Skip to content

Commit

Permalink
feat: embedded mira swap
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Jan 20, 2025
1 parent 8455a9f commit 7974c32
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
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

0 comments on commit 7974c32

Please sign in to comment.