diff --git a/apps/token/src/app.tsx b/apps/token/src/app.tsx index 4fe0e19e3..31321f7de 100644 --- a/apps/token/src/app.tsx +++ b/apps/token/src/app.tsx @@ -8,6 +8,7 @@ import { AppLoader } from './app-loader'; import { NetworkInfo } from '@vegaprotocol/network-info'; import { BalanceManager } from './components/balance-manager'; import { EthWallet } from './components/eth-wallet'; +import { AppLayout } from './components/page-templates/app-layout'; import { TemplateSidebar } from './components/page-templates/template-sidebar'; import { TransactionModal } from './components/transactions-modal'; import { VegaWallet } from './components/vega-wallet'; @@ -88,14 +89,14 @@ const Web3Container = ({ <> -
+
-
+ diff --git a/apps/token/src/components/page-templates/app-layout.tsx b/apps/token/src/components/page-templates/app-layout.tsx new file mode 100644 index 000000000..9d2a58970 --- /dev/null +++ b/apps/token/src/components/page-templates/app-layout.tsx @@ -0,0 +1,21 @@ +import classNames from 'classnames'; +import { useVegaWallet } from '@vegaprotocol/wallet'; +import type { ReactNode } from 'react'; + +interface AppLayoutProps { + children: ReactNode; +} +export const AppLayout = ({ children }: AppLayoutProps) => { + const { isReadOnly } = useVegaWallet(); + const AppLayoutClasses = classNames( + 'app w-full max-w-[1500px] mx-auto grid min-h-full', + 'border-neutral-700 lg:border-l lg:border-r', + 'lg:text-body-large', + { + 'grid-rows-[repeat(2,min-content)_1fr_min-content]': !isReadOnly, + 'grid-rows-[repeat(3,min-content)_1fr_min-content]': isReadOnly, + } + ); + + return
{children}
; +}; diff --git a/apps/token/src/components/page-templates/template-sidebar.tsx b/apps/token/src/components/page-templates/template-sidebar.tsx index d3bcba8b4..c7b6b76b6 100644 --- a/apps/token/src/components/page-templates/template-sidebar.tsx +++ b/apps/token/src/components/page-templates/template-sidebar.tsx @@ -30,9 +30,7 @@ export function TemplateSidebar({ children, sidebar }: TemplateSidebarProps) {