Skip to content

Commit

Permalink
Merge pull request #204 from Gateway-DAO/hotfix/testnet-alerts
Browse files Browse the repository at this point in the history
Hotfix/testnet alerts
  • Loading branch information
andrefelizardo authored Dec 13, 2023
2 parents fc978c4 + 580048e commit d232a06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/(light)/dashboard/components/dashboard-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import { usePathname } from 'next/navigation';
import { PropsWithChildren, ReactNode } from 'react';

import { sandboxAlert } from '@/locale/en/alert-messages';
Expand All @@ -26,6 +27,8 @@ export default function DashboardLayout({
mobileMenuItems,
}: PropsWithChildren<Props>) {
const testnet = currentEnv() === 'testnet';
const pathname = usePathname();
const isNotWalletPage = !pathname.includes('wallet');

return (
<Stack
Expand Down Expand Up @@ -67,7 +70,7 @@ export default function DashboardLayout({
overflow: 'hidden',
}}
>
{testnet && <SandboxAlert />}
{testnet && isNotWalletPage && <SandboxAlert />}
{children}
</DashboardPage>
{mobileMenuItems}
Expand Down

0 comments on commit d232a06

Please sign in to comment.