-
- {showDetailView ? : null}
-
-
-
-
-
- ) : dataState === 'noneYet' ? (
-
- ) : dataState === 'error' ? (
-
- ) : null
- }
- sortableColumns={sortableColumns}
- pageSize={limit}
- data={datasetPage}
- columns={columns}
- sortDirection={sortDirection}
- sortField={sortField}
- toggleSort={toggleSort}
- focusId={selectedContract?.id}
- rowSize="default"
- />
-
-
-
+
+
+ {showDetailView ? : null}
-
+
+
+
+
+ ) : dataState === 'noneYet' ? (
+
+ ) : dataState === 'error' ? (
+
+ ) : null
+ }
+ sortableColumns={sortableColumns}
+ pageSize={limit}
+ data={datasetPage}
+ columns={columns}
+ sortDirection={sortDirection}
+ sortField={sortField}
+ toggleSort={toggleSort}
+ focusId={selectedContract?.id}
+ rowSize="default"
+ />
+
+
+
+
)
}
diff --git a/apps/renterd/components/Files/Layout.tsx b/apps/renterd/components/Files/Layout.tsx
new file mode 100644
index 000000000..6badb2439
--- /dev/null
+++ b/apps/renterd/components/Files/Layout.tsx
@@ -0,0 +1,37 @@
+import { RenterdSidenav } from '../RenterdSidenav'
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import { FilesBreadcrumbMenu } from '../FilesDirectory/FilesBreadcrumbMenu'
+import { FilesFlatBreadcrumbMenu } from '../FilesFlat/FilesFlatBreadcrumbMenu'
+import {
+ RenterdAuthedLayout,
+ RenterdAuthedPageLayoutProps,
+} from '../RenterdAuthedLayout'
+import { FilesActionsMenu } from '../FilesDirectory/FilesActionsMenu'
+import { FilesStatsMenu } from '../FilesDirectory/FilesStatsMenu'
+import { useFilesManager } from '../../contexts/filesManager'
+
+export const Layout = RenterdAuthedLayout
+export function useLayoutProps(): RenterdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ const { isViewingBuckets, activeExplorerMode } = useFilesManager()
+ const activeMode =
+ activeExplorerMode === 'directory' || isViewingBuckets
+ ? 'directory'
+ : 'flat'
+ return {
+ title: 'Files',
+ navTitle: null,
+ routes,
+ sidenav:
,
+ openSettings: () => openDialog('settings'),
+ nav:
+ activeMode === 'directory' ? (
+
+ ) : (
+
+ ),
+ stats:
,
+ actions:
,
+ }
+}
diff --git a/apps/renterd/components/FilesDirectory/index.tsx b/apps/renterd/components/FilesDirectory/index.tsx
index f7feb0a1c..6418d0c08 100644
--- a/apps/renterd/components/FilesDirectory/index.tsx
+++ b/apps/renterd/components/FilesDirectory/index.tsx
@@ -1,29 +1,9 @@
-import { RenterdSidenav } from '../RenterdSidenav'
-import { routes } from '../../config/routes'
-import { useDialog } from '../../contexts/dialog'
-import { FilesBreadcrumbMenu } from './FilesBreadcrumbMenu'
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
-import { FilesActionsMenu } from './FilesActionsMenu'
-import { FilesStatsMenu } from './FilesStatsMenu'
import { FilesExplorer } from './FilesExplorer'
export function FilesDirectory() {
- const { openDialog } = useDialog()
-
return (
-
}
- nav={
}
- stats={
}
- actions={
}
- openSettings={() => openDialog('settings')}
- >
-
-
-
-
+
+
+
)
}
diff --git a/apps/renterd/components/FilesFlat/index.tsx b/apps/renterd/components/FilesFlat/index.tsx
index 9b6c50f36..b9e1126a2 100644
--- a/apps/renterd/components/FilesFlat/index.tsx
+++ b/apps/renterd/components/FilesFlat/index.tsx
@@ -1,29 +1,9 @@
-import { RenterdSidenav } from '../RenterdSidenav'
-import { routes } from '../../config/routes'
-import { useDialog } from '../../contexts/dialog'
-import { FilesFlatBreadcrumbMenu } from './FilesFlatBreadcrumbMenu'
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
-import { FilesActionsMenu } from './FilesActionsMenu'
-import { FilesStatsMenu } from './FilesStatsMenu'
import { FilesExplorer } from './FilesExplorer'
export function FilesFlat() {
- const { openDialog } = useDialog()
-
return (
-
}
- nav={
}
- stats={
}
- actions={
}
- openSettings={() => openDialog('settings')}
- >
-
-
-
-
+
+
+
)
}
diff --git a/apps/renterd/components/Home/Layout.tsx b/apps/renterd/components/Home/Layout.tsx
new file mode 100644
index 000000000..0ee3f7c82
--- /dev/null
+++ b/apps/renterd/components/Home/Layout.tsx
@@ -0,0 +1,18 @@
+import {
+ RenterdAuthedLayout,
+ RenterdAuthedPageLayoutProps,
+} from '../RenterdAuthedLayout'
+import { RenterdSidenav } from '../RenterdSidenav'
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+
+export const Layout = RenterdAuthedLayout
+export function useLayoutProps(): RenterdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ return {
+ title: 'Dashboard',
+ routes,
+ sidenav:
,
+ openSettings: () => openDialog('settings'),
+ }
+}
diff --git a/apps/renterd/components/Home/index.tsx b/apps/renterd/components/Home/index.tsx
index 66876bab0..221980e8c 100644
--- a/apps/renterd/components/Home/index.tsx
+++ b/apps/renterd/components/Home/index.tsx
@@ -1,26 +1,7 @@
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
-import { RenterdSidenav } from '../RenterdSidenav'
import { routes } from '../../config/routes'
-import { useDialog } from '../../contexts/dialog'
import { useEffect } from 'react'
import { useRouter } from 'next/router'
export function Home() {
- const router = useRouter()
- const { openDialog } = useDialog()
-
- useEffect(() => {
- router.replace(routes.buckets.index)
- }, [router])
-
- return (
-
}
- openSettings={() => openDialog('settings')}
- >
-
-
- )
+ return
}
diff --git a/apps/renterd/components/Hosts/Layout.tsx b/apps/renterd/components/Hosts/Layout.tsx
new file mode 100644
index 000000000..b0531fffe
--- /dev/null
+++ b/apps/renterd/components/Hosts/Layout.tsx
@@ -0,0 +1,24 @@
+import { RenterdSidenav } from '../RenterdSidenav'
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import {
+ RenterdAuthedLayout,
+ RenterdAuthedPageLayoutProps,
+} from '../RenterdAuthedLayout'
+import { HostsActionsMenu } from './HostsActionsMenu'
+import { HostsFilterBar } from './HostsFilterBar'
+
+export const Layout = RenterdAuthedLayout
+export function useLayoutProps(): RenterdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ return {
+ title: 'Hosts',
+ routes,
+ sidenav:
,
+ openSettings: () => openDialog('settings'),
+ size: 'full',
+ actions:
,
+ stats:
,
+ scroll: false,
+ }
+}
diff --git a/apps/renterd/components/Hosts/index.tsx b/apps/renterd/components/Hosts/index.tsx
index c548fa951..58aac72cb 100644
--- a/apps/renterd/components/Hosts/index.tsx
+++ b/apps/renterd/components/Hosts/index.tsx
@@ -1,18 +1,11 @@
-import { RenterdSidenav } from '../RenterdSidenav'
-import { routes } from '../../config/routes'
import { ScrollArea, Table } from '@siafoundation/design-system'
-import { useDialog } from '../../contexts/dialog'
import { useHosts } from '../../contexts/hosts'
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
import { StateEmpty } from './StateEmpty'
-import { HostsActionsMenu } from './HostsActionsMenu'
-import { HostsFilterBar } from './HostsFilterBar'
import { HostMap } from './HostMap'
import { cx } from 'class-variance-authority'
import { getHostStatus } from '../../contexts/hosts/status'
export function Hosts() {
- const { openDialog } = useDialog()
const {
dataset,
activeHost,
@@ -24,67 +17,56 @@ export function Hosts() {
} = useHosts()
return (
-
}
- openSettings={() => openDialog('settings')}
- size="full"
- actions={
}
- stats={
}
- scroll={false}
- >
-
-
-
-
-
-
-
-
}
- context={tableContext}
- pageSize={limit}
- data={dataset}
- columns={columns}
- rowSize="default"
- />
-
-
-
+
+
+
-
+
+
+
+
}
+ context={tableContext}
+ pageSize={limit}
+ data={dataset}
+ columns={columns}
+ rowSize="default"
+ />
+
+
+
+
)
}
diff --git a/apps/renterd/components/Keys/Layout.tsx b/apps/renterd/components/Keys/Layout.tsx
new file mode 100644
index 000000000..83e3b1a5b
--- /dev/null
+++ b/apps/renterd/components/Keys/Layout.tsx
@@ -0,0 +1,22 @@
+import { RenterdSidenav } from '../RenterdSidenav'
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import {
+ RenterdAuthedLayout,
+ RenterdAuthedPageLayoutProps,
+} from '../RenterdAuthedLayout'
+import { KeysActionsMenu } from './KeysActionsMenu'
+import { KeysStatsMenu } from './KeysStatsMenu'
+
+export const Layout = RenterdAuthedLayout
+export function useLayoutProps(): RenterdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ return {
+ title: 'Keys',
+ routes,
+ sidenav:
,
+ openSettings: () => openDialog('settings'),
+ actions:
,
+ stats:
,
+ }
+}
diff --git a/apps/renterd/components/Keys/index.tsx b/apps/renterd/components/Keys/index.tsx
index 14edfb85c..59b88784c 100644
--- a/apps/renterd/components/Keys/index.tsx
+++ b/apps/renterd/components/Keys/index.tsx
@@ -1,18 +1,11 @@
-import { RenterdSidenav } from '../RenterdSidenav'
-import { routes } from '../../config/routes'
import { Table } from '@siafoundation/design-system'
-import { useDialog } from '../../contexts/dialog'
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
import { StateNoneMatching } from './StateNoneMatching'
import { StateNoneYet } from './StateNoneYet'
-import { KeysActionsMenu } from './KeysActionsMenu'
import { StateError } from './StateError'
import { useKeys } from '../../contexts/keys'
import { KeysBatchMenu } from './KeysBatchMenu'
-import { KeysStatsMenu } from './KeysStatsMenu'
export function Keys() {
- const { openDialog } = useDialog()
const {
columns,
datasetPage,
@@ -26,39 +19,30 @@ export function Keys() {
} = useKeys()
return (
-
}
- openSettings={() => openDialog('settings')}
- actions={
}
- stats={
}
- >
-
-
-
- ) : dataState === 'noneYet' ? (
-
- ) : dataState === 'error' ? (
-
- ) : null
- }
- sortableColumns={sortableColumns}
- pageSize={limit}
- data={datasetPage}
- context={cellContext}
- columns={columns}
- sortDirection={sortDirection}
- sortField={sortField}
- toggleSort={toggleSort}
- rowSize="default"
- />
-
-
+
+
+
+ ) : dataState === 'noneYet' ? (
+
+ ) : dataState === 'error' ? (
+
+ ) : null
+ }
+ sortableColumns={sortableColumns}
+ pageSize={limit}
+ data={datasetPage}
+ context={cellContext}
+ columns={columns}
+ sortDirection={sortDirection}
+ sortField={sortField}
+ toggleSort={toggleSort}
+ rowSize="default"
+ />
+
)
}
diff --git a/apps/renterd/components/Login/Layout.tsx b/apps/renterd/components/Login/Layout.tsx
new file mode 100644
index 000000000..672592187
--- /dev/null
+++ b/apps/renterd/components/Login/Layout.tsx
@@ -0,0 +1,9 @@
+import {
+ RenterdPublicLayout,
+ RenterdPublicPageLayoutProps,
+} from '../RenterdPublicLayout'
+
+export const Layout = RenterdPublicLayout
+export function useLayoutProps(): RenterdPublicPageLayoutProps {
+ return {}
+}
diff --git a/apps/renterd/components/Login/index.tsx b/apps/renterd/components/Login/index.tsx
index 47be00d4a..b074c060a 100644
--- a/apps/renterd/components/Login/index.tsx
+++ b/apps/renterd/components/Login/index.tsx
@@ -1,11 +1,8 @@
import { AppLogin } from '@siafoundation/design-system'
import { connectivityRoute, routes } from '../../config/routes'
-import { RenterdPublicLayout } from '../RenterdPublicLayout'
export function Login() {
return (
-
-
-
+
)
}
diff --git a/apps/renterd/components/Node/Layout.tsx b/apps/renterd/components/Node/Layout.tsx
new file mode 100644
index 000000000..dff2c72ee
--- /dev/null
+++ b/apps/renterd/components/Node/Layout.tsx
@@ -0,0 +1,18 @@
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import { RenterdSidenav } from '../RenterdSidenav'
+import {
+ RenterdAuthedLayout,
+ RenterdAuthedPageLayoutProps,
+} from '../RenterdAuthedLayout'
+
+export const Layout = RenterdAuthedLayout
+export function useLayoutProps(): RenterdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ return {
+ title: 'Node',
+ routes,
+ sidenav:
,
+ openSettings: () => openDialog('settings'),
+ }
+}
diff --git a/apps/renterd/components/Node/index.tsx b/apps/renterd/components/Node/index.tsx
index c5cb79391..30535e654 100644
--- a/apps/renterd/components/Node/index.tsx
+++ b/apps/renterd/components/Node/index.tsx
@@ -4,10 +4,7 @@ import {
useSyncerPeers,
useTxPoolTransactions,
} from '@siafoundation/renterd-react'
-import { routes } from '../../config/routes'
import { useDialog } from '../../contexts/dialog'
-import { RenterdSidenav } from '../RenterdSidenav'
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
export function Node() {
const peers = useSyncerPeers()
@@ -28,32 +25,25 @@ export function Node() {
const { openDialog } = useDialog()
return (
-
}
- openSettings={() => openDialog('settings')}
- title="Node"
- >
-
-
-
-
-
-
-
openDialog('connectPeer')}
+
+
+
+
+
-
+
openDialog('connectPeer')}
+ />
+
)
}
diff --git a/apps/renterd/components/RenterdAuthedLayout.tsx b/apps/renterd/components/RenterdAuthedLayout.tsx
index eef2b6298..c9d6a21b1 100644
--- a/apps/renterd/components/RenterdAuthedLayout.tsx
+++ b/apps/renterd/components/RenterdAuthedLayout.tsx
@@ -6,14 +6,12 @@ import { useSyncStatus } from '../hooks/useSyncStatus'
import { Profile } from './Profile'
import { RenterdTestnetWarningBanner } from './RenterdTestnetWarningBanner'
-type Props = React.ComponentProps
+type Props = Omit<
+ React.ComponentProps,
+ 'appName' | 'connectivityRoute' | 'walletBalance' | 'profile' | 'isSynced'
+>
-export function RenterdAuthedLayout(
- props: Omit<
- Props,
- 'appName' | 'connectivityRoute' | 'walletBalance' | 'profile' | 'isSynced'
- >
-) {
+export function RenterdAuthedLayout(props: Props) {
const wallet = useWallet()
const { isSynced } = useSyncStatus()
return (
@@ -35,3 +33,5 @@ export function RenterdAuthedLayout(
/>
)
}
+
+export type RenterdAuthedPageLayoutProps = Omit
diff --git a/apps/renterd/components/RenterdPublicLayout.tsx b/apps/renterd/components/RenterdPublicLayout.tsx
index 22e2da53f..1378d7367 100644
--- a/apps/renterd/components/RenterdPublicLayout.tsx
+++ b/apps/renterd/components/RenterdPublicLayout.tsx
@@ -1,7 +1,9 @@
import { AppPublicLayout } from '@siafoundation/design-system'
-type Props = React.ComponentProps
+type Props = Omit, 'appName'>
-export function RenterdPublicLayout(props: Omit) {
+export function RenterdPublicLayout(props: Props) {
return
}
+
+export type RenterdPublicPageLayoutProps = Omit
diff --git a/apps/renterd/components/Uploads/Layout.tsx b/apps/renterd/components/Uploads/Layout.tsx
new file mode 100644
index 000000000..af658224e
--- /dev/null
+++ b/apps/renterd/components/Uploads/Layout.tsx
@@ -0,0 +1,25 @@
+import { RenterdSidenav } from '../RenterdSidenav'
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import {
+ RenterdAuthedLayout,
+ RenterdAuthedPageLayoutProps,
+} from '../RenterdAuthedLayout'
+import { UploadsActionsMenu } from './UploadsActionsMenu'
+import { UploadsStatsMenu } from './UploadsStatsMenu'
+import { UploadsBreadcrumbMenu } from './UploadsBreadcrumbMenu'
+
+export const Layout = RenterdAuthedLayout
+export function useLayoutProps(): RenterdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ return {
+ title: 'Uploads',
+ navTitle: null,
+ routes,
+ sidenav: ,
+ openSettings: () => openDialog('settings'),
+ actions: ,
+ stats: ,
+ nav: ,
+ }
+}
diff --git a/apps/renterd/components/Uploads/index.tsx b/apps/renterd/components/Uploads/index.tsx
index db4d7b226..c1b62cd30 100644
--- a/apps/renterd/components/Uploads/index.tsx
+++ b/apps/renterd/components/Uploads/index.tsx
@@ -1,29 +1,9 @@
-import { RenterdSidenav } from '../RenterdSidenav'
-import { routes } from '../../config/routes'
-import { useDialog } from '../../contexts/dialog'
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
-import { UploadsActionsMenu } from './UploadsActionsMenu'
-import { UploadsStatsMenu } from './UploadsStatsMenu'
import { UploadsTable } from './UploadsTable'
-import { UploadsBreadcrumbMenu } from './UploadsBreadcrumbMenu'
export function Uploads() {
- const { openDialog } = useDialog()
-
return (
- }
- nav={}
- stats={}
- actions={}
- openSettings={() => openDialog('settings')}
- >
-
-
-
-
+
+
+
)
}
diff --git a/apps/renterd/components/Wallet/Layout.tsx b/apps/renterd/components/Wallet/Layout.tsx
new file mode 100644
index 000000000..e20137f4a
--- /dev/null
+++ b/apps/renterd/components/Wallet/Layout.tsx
@@ -0,0 +1,47 @@
+import { WalletLayoutActions } from '@siafoundation/design-system'
+import { useWallet } from '@siafoundation/renterd-react'
+import { useDialog } from '../../contexts/dialog'
+import { routes } from '../../config/routes'
+import BigNumber from 'bignumber.js'
+import { RenterdSidenav } from '../RenterdSidenav'
+import {
+ RenterdAuthedLayout,
+ RenterdAuthedPageLayoutProps,
+} from '../RenterdAuthedLayout'
+import { useSyncStatus } from '../../hooks/useSyncStatus'
+import { WalletFilterBar } from './WalletFilterBar'
+
+export const Layout = RenterdAuthedLayout
+export function useLayoutProps(): RenterdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ const wallet = useWallet()
+ const { isSynced, isWalletSynced, syncPercent, walletScanPercent } =
+ useSyncStatus()
+ return {
+ title: 'Wallet',
+ routes,
+ sidenav: ,
+ openSettings: () => openDialog('settings'),
+ actions: (
+ openDialog('addressDetails')}
+ sendSiacoin={() => openDialog('sendSiacoin')}
+ />
+ ),
+ stats: ,
+ }
+}
diff --git a/apps/renterd/components/Wallet/index.tsx b/apps/renterd/components/Wallet/index.tsx
index 741cfe588..921d636b6 100644
--- a/apps/renterd/components/Wallet/index.tsx
+++ b/apps/renterd/components/Wallet/index.tsx
@@ -1,27 +1,10 @@
-import {
- BalanceEvolution,
- Table,
- WalletLayoutActions,
-} from '@siafoundation/design-system'
-import { useWallet } from '@siafoundation/renterd-react'
-import { useDialog } from '../../contexts/dialog'
-import { routes } from '../../config/routes'
-import BigNumber from 'bignumber.js'
-import { RenterdSidenav } from '../RenterdSidenav'
-import { RenterdAuthedLayout } from '../RenterdAuthedLayout'
-import { useSyncStatus } from '../../hooks/useSyncStatus'
+import { BalanceEvolution, Table } from '@siafoundation/design-system'
import { useTransactions } from '../../contexts/transactions'
-import { WalletFilterBar } from './WalletFilterBar'
import { StateNoneMatching } from './StateNoneMatching'
import { StateNoneYet } from './StateNoneYet'
import { StateError } from './StateError'
export function Wallet() {
- const { openDialog } = useDialog()
- const wallet = useWallet()
- const { isSynced, isWalletSynced, syncPercent, walletScanPercent } =
- useSyncStatus()
-
const {
balances,
metrics,
@@ -37,64 +20,36 @@ export function Wallet() {
} = useTransactions()
return (
- }
- openSettings={() => openDialog('settings')}
- title="Wallet"
- actions={
- openDialog('addressDetails')}
- sendSiacoin={() => openDialog('sendSiacoin')}
- />
- }
- stats={}
- >
-
- {balances?.length ? (
-
- ) : null}
-
- ) : dataState === 'noneYet' ? (
-
- ) : dataState === 'error' ? (
-
- ) : null
- }
- pageSize={defaultPageSize}
- data={dataset}
- context={cellContext}
- columns={columns}
- sortableColumns={sortableColumns}
- sortDirection={sortDirection}
- sortField={sortField}
- toggleSort={toggleSort}
+
+ {balances?.length ? (
+
-
-
+ ) : null}
+
+ ) : dataState === 'noneYet' ? (
+
+ ) : dataState === 'error' ? (
+
+ ) : null
+ }
+ pageSize={defaultPageSize}
+ data={dataset}
+ context={cellContext}
+ columns={columns}
+ sortableColumns={sortableColumns}
+ sortDirection={sortDirection}
+ sortField={sortField}
+ toggleSort={toggleSort}
+ />
+
)
}
diff --git a/apps/renterd/pages/_app.tsx b/apps/renterd/pages/_app.tsx
index 8db223837..57173c7dc 100644
--- a/apps/renterd/pages/_app.tsx
+++ b/apps/renterd/pages/_app.tsx
@@ -5,24 +5,41 @@ import { Providers } from '../config/providers'
import { routes } from '../config/routes'
import { rootFontClasses } from '@siafoundation/fonts'
import { busStateRoute } from '@siafoundation/renterd-types'
+import { NextPage } from 'next'
-export default function App({
- Component,
- pageProps,
-}: AppProps<{
+type NextPageWithLayout = NextPage & {
+ Layout: ({ children }: { children: React.ReactElement }) => React.ReactNode
+ useLayoutProps: () => Record
+}
+
+type AppPropsWithLayout = AppProps<{
fallback?: Record
-}>) {
+}> & {
+ Component: NextPageWithLayout
+}
+
+export default function App(props: AppPropsWithLayout) {
return (
-
+
)
}
+function AppCore({ Component, pageProps }: AppPropsWithLayout) {
+ const Layout = Component.Layout
+ const layoutProps = Component.useLayoutProps()
+ const { fallback, ...rest } = pageProps
+ return (
+
+
+
+ )
+}
diff --git a/apps/renterd/pages/alerts/index.tsx b/apps/renterd/pages/alerts/index.tsx
index aa65cb8d1..14b18fd76 100644
--- a/apps/renterd/pages/alerts/index.tsx
+++ b/apps/renterd/pages/alerts/index.tsx
@@ -1,5 +1,9 @@
import { Alerts } from '../../components/Alerts'
+import { Layout, useLayoutProps } from '../../components/Alerts/Layout'
-export default function AlertsPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/buckets/[bucket]/files/[[...path]].tsx b/apps/renterd/pages/buckets/[bucket]/files/[[...path]].tsx
index 627904628..a98ac0b99 100644
--- a/apps/renterd/pages/buckets/[bucket]/files/[[...path]].tsx
+++ b/apps/renterd/pages/buckets/[bucket]/files/[[...path]].tsx
@@ -1,5 +1,9 @@
import { Files } from '../../../../components/Files'
+import { Layout, useLayoutProps } from '../../../../components/Files/Layout'
-export default function FilesPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/buckets/[bucket]/uploads/index.tsx b/apps/renterd/pages/buckets/[bucket]/uploads/index.tsx
index 50d1a997f..74262c529 100644
--- a/apps/renterd/pages/buckets/[bucket]/uploads/index.tsx
+++ b/apps/renterd/pages/buckets/[bucket]/uploads/index.tsx
@@ -1,5 +1,9 @@
import { Uploads } from '../../../../components/Uploads'
+import { Layout, useLayoutProps } from '../../../../components/Uploads/Layout'
-export default function UploadsPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/buckets/index.tsx b/apps/renterd/pages/buckets/index.tsx
index 1f29ab039..cefc47caf 100644
--- a/apps/renterd/pages/buckets/index.tsx
+++ b/apps/renterd/pages/buckets/index.tsx
@@ -1,5 +1,9 @@
import { Files } from '../../components/Files'
+import { Layout, useLayoutProps } from '../../components/Files/Layout'
-export default function FilesPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/config/index.tsx b/apps/renterd/pages/config/index.tsx
index 121c85011..c9116dbb8 100644
--- a/apps/renterd/pages/config/index.tsx
+++ b/apps/renterd/pages/config/index.tsx
@@ -1,5 +1,9 @@
import { Config } from '../../components/Config'
+import { Layout, useLayoutProps } from '../../components/Config/Layout'
-export default function ConfigPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/contracts/index.tsx b/apps/renterd/pages/contracts/index.tsx
index 35ffbe5a1..b20b2a162 100644
--- a/apps/renterd/pages/contracts/index.tsx
+++ b/apps/renterd/pages/contracts/index.tsx
@@ -1,5 +1,9 @@
import { Contracts } from '../../components/Contracts'
+import { Layout, useLayoutProps } from '../../components/Contracts/Layout'
-export default function ContractsPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/hosts/index.tsx b/apps/renterd/pages/hosts/index.tsx
index 0d57e9d27..ff6c27252 100644
--- a/apps/renterd/pages/hosts/index.tsx
+++ b/apps/renterd/pages/hosts/index.tsx
@@ -1,5 +1,9 @@
import { Hosts } from '../../components/Hosts'
+import { Layout, useLayoutProps } from '../../components/Hosts/Layout'
-export default function HostsPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/index.tsx b/apps/renterd/pages/index.tsx
index 31ad74ec7..c847bcc29 100644
--- a/apps/renterd/pages/index.tsx
+++ b/apps/renterd/pages/index.tsx
@@ -1,5 +1,9 @@
import { Home } from '../components/Home'
+import { Layout, useLayoutProps } from '../components/Home/Layout'
-export default function HomePage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/keys/index.tsx b/apps/renterd/pages/keys/index.tsx
index 5e8cbd6e4..d68938925 100644
--- a/apps/renterd/pages/keys/index.tsx
+++ b/apps/renterd/pages/keys/index.tsx
@@ -1,5 +1,9 @@
import { Keys } from '../../components/Keys'
+import { Layout, useLayoutProps } from '../../components/Keys/Layout'
-export default function KeysPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/login.tsx b/apps/renterd/pages/login.tsx
index 4d416fb2b..cf237134d 100644
--- a/apps/renterd/pages/login.tsx
+++ b/apps/renterd/pages/login.tsx
@@ -1,5 +1,9 @@
import { Login } from '../components/Login'
+import { Layout, useLayoutProps } from '../components/Login/Layout'
-export default function LoginPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/node/index.tsx b/apps/renterd/pages/node/index.tsx
index 1e780e299..95577b5cf 100644
--- a/apps/renterd/pages/node/index.tsx
+++ b/apps/renterd/pages/node/index.tsx
@@ -1,5 +1,9 @@
import { Node } from '../../components/Node'
+import { Layout, useLayoutProps } from '../../components/Node/Layout'
-export default function NodePage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/renterd/pages/wallet/index.tsx b/apps/renterd/pages/wallet/index.tsx
index 557afd573..371377b30 100644
--- a/apps/renterd/pages/wallet/index.tsx
+++ b/apps/renterd/pages/wallet/index.tsx
@@ -1,5 +1,9 @@
import { Wallet } from '../../components/Wallet'
+import { Layout, useLayoutProps } from '../../components/Wallet/Layout'
-export default function WalletView() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/walletd/components/Login/Layout.tsx b/apps/walletd/components/Login/Layout.tsx
new file mode 100644
index 000000000..5bb608ec4
--- /dev/null
+++ b/apps/walletd/components/Login/Layout.tsx
@@ -0,0 +1,9 @@
+import {
+ WalletdPublicLayout,
+ WalletdPublicPageLayoutProps,
+} from '../WalletdPublicLayout'
+
+export const Layout = WalletdPublicLayout
+export function useLayoutProps(): WalletdPublicPageLayoutProps {
+ return {}
+}
diff --git a/apps/walletd/components/Login/index.tsx b/apps/walletd/components/Login/index.tsx
index 5c20d73a1..0f822887f 100644
--- a/apps/walletd/components/Login/index.tsx
+++ b/apps/walletd/components/Login/index.tsx
@@ -1,11 +1,8 @@
import { AppLogin } from '@siafoundation/design-system'
import { connectivityRoute, routes } from '../../config/routes'
-import { WalletdPublicLayout } from '../WalletdPublicLayout'
export function Login() {
return (
-
-
-
+
)
}
diff --git a/apps/walletd/components/Node/Layout.tsx b/apps/walletd/components/Node/Layout.tsx
new file mode 100644
index 000000000..dc56a7c45
--- /dev/null
+++ b/apps/walletd/components/Node/Layout.tsx
@@ -0,0 +1,18 @@
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import { WalletdSidenav } from '../WalletdSidenav'
+import {
+ WalletdAuthedLayout,
+ WalletdAuthedPageLayoutProps,
+} from '../WalletdAuthedLayout'
+
+export const Layout = WalletdAuthedLayout
+export function useLayoutProps(): WalletdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ return {
+ title: 'Node',
+ routes,
+ sidenav: ,
+ openSettings: () => openDialog('settings'),
+ }
+}
diff --git a/apps/walletd/components/Node/index.tsx b/apps/walletd/components/Node/index.tsx
index 9e023c96e..006e30ec9 100644
--- a/apps/walletd/components/Node/index.tsx
+++ b/apps/walletd/components/Node/index.tsx
@@ -4,10 +4,7 @@ import {
useSyncerPeers,
useTxPoolTransactions,
} from '@siafoundation/walletd-react'
-import { routes } from '../../config/routes'
import { useDialog } from '../../contexts/dialog'
-import { WalletdSidenav } from '../WalletdSidenav'
-import { WalletdAuthedLayout } from '../WalletdAuthedLayout'
export function Node() {
const peers = useSyncerPeers()
@@ -33,41 +30,32 @@ export function Node() {
: 0
return (
- }
- openSettings={() => openDialog('settings')}
- title="Node"
- >
-
-
-
+
+
+
+
+
+
+
+
p.addr)}
+ connectPeer={() => openDialog('connectPeer')}
/>
-
-
-
-
-
p.addr)}
- connectPeer={() => openDialog('connectPeer')}
- />
-
- {/*
-
+
)
}
diff --git a/apps/walletd/components/Wallet/Layout.tsx b/apps/walletd/components/Wallet/Layout.tsx
new file mode 100644
index 000000000..9f941bb09
--- /dev/null
+++ b/apps/walletd/components/Wallet/Layout.tsx
@@ -0,0 +1,27 @@
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import {
+ WalletdAuthedLayout,
+ WalletdAuthedPageLayoutProps,
+} from '../WalletdAuthedLayout'
+import { WalletdSidenav } from '../WalletdSidenav'
+import { WalletActionsMenu } from './WalletActionsMenu'
+import { useWallets } from '../../contexts/wallets'
+import { WalletNavMenu } from './WalletNavMenu'
+import { EventsFilterBar } from './EventsFilterBar'
+
+export const Layout = WalletdAuthedLayout
+export function useLayoutProps(): WalletdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ const { wallet } = useWallets()
+ return {
+ routes,
+ sidenav: ,
+ openSettings: () => openDialog('settings'),
+ title: wallet?.name,
+ nav: ,
+ actions: ,
+ stats: ,
+ size: 'full',
+ }
+}
diff --git a/apps/walletd/components/Wallet/index.tsx b/apps/walletd/components/Wallet/index.tsx
index 9772cbf16..37b35e13a 100644
--- a/apps/walletd/components/Wallet/index.tsx
+++ b/apps/walletd/components/Wallet/index.tsx
@@ -1,20 +1,10 @@
import { Table } from '@siafoundation/design-system'
-import { routes } from '../../config/routes'
-import { useDialog } from '../../contexts/dialog'
-import { WalletdAuthedLayout } from '../WalletdAuthedLayout'
-import { WalletdSidenav } from '../WalletdSidenav'
-import { WalletActionsMenu } from './WalletActionsMenu'
import { useEvents } from '../../contexts/events'
import { StateNoneMatching } from './StateNoneMatching'
import { StateNoneYet } from './StateNoneYet'
import { StateError } from './StateError'
-import { useWallets } from '../../contexts/wallets'
-import { WalletNavMenu } from './WalletNavMenu'
-import { EventsFilterBar } from './EventsFilterBar'
export function Wallet() {
- const { openDialog } = useDialog()
- const { wallet } = useWallets()
const {
dataset,
dataState,
@@ -27,39 +17,28 @@ export function Wallet() {
} = useEvents()
return (
- }
- openSettings={() => openDialog('settings')}
- title={wallet?.name}
- nav={}
- actions={}
- stats={}
- size="full"
- >
-
-
- ) : dataState === 'noneYet' ? (
-
- ) : dataState === 'error' ? (
-
- ) : null
- }
- pageSize={6}
- data={dataset}
- context={cellContext}
- columns={columns}
- sortableColumns={sortableColumns}
- sortDirection={sortDirection}
- sortField={sortField}
- toggleSort={toggleSort}
- />
-
-
+
+
+ ) : dataState === 'noneYet' ? (
+
+ ) : dataState === 'error' ? (
+
+ ) : null
+ }
+ pageSize={6}
+ data={dataset}
+ context={cellContext}
+ columns={columns}
+ sortableColumns={sortableColumns}
+ sortDirection={sortDirection}
+ sortField={sortField}
+ toggleSort={toggleSort}
+ />
+
)
}
diff --git a/apps/walletd/components/WalletAddresses/Layout.tsx b/apps/walletd/components/WalletAddresses/Layout.tsx
new file mode 100644
index 000000000..81c669ac6
--- /dev/null
+++ b/apps/walletd/components/WalletAddresses/Layout.tsx
@@ -0,0 +1,53 @@
+import { Link, Text, truncate } from '@siafoundation/design-system'
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import {
+ WalletdAuthedLayout,
+ WalletdAuthedPageLayoutProps,
+} from '../WalletdAuthedLayout'
+import { WalletdSidenav } from '../WalletdSidenav'
+import { AddressesActionsMenu } from './AddressesActionsMenu'
+import { useRouter } from 'next/router'
+import { useWallets } from '../../contexts/wallets'
+import { AddressesFiltersBar } from './AddressesFilterBar'
+
+export const Layout = WalletdAuthedLayout
+export function useLayoutProps(): WalletdAuthedPageLayoutProps {
+ const router = useRouter()
+ const id = router.query.id as string
+ const { openDialog } = useDialog()
+ const { wallet } = useWallets()
+ return {
+ routes,
+ sidenav: ,
+ openSettings: () => openDialog('settings'),
+ title: wallet?.name,
+ navTitle: (
+
+
+ {truncate(wallet?.name, 20)}
+
+
+ /
+
+
+ Addresses
+
+
+ ),
+ actions: ,
+ stats: ,
+ size: '3',
+ }
+}
diff --git a/apps/walletd/components/WalletAddresses/index.tsx b/apps/walletd/components/WalletAddresses/index.tsx
index 17a2ba68e..0bea96982 100644
--- a/apps/walletd/components/WalletAddresses/index.tsx
+++ b/apps/walletd/components/WalletAddresses/index.tsx
@@ -1,22 +1,10 @@
-import { Link, Table, Text, truncate } from '@siafoundation/design-system'
-import { routes } from '../../config/routes'
-import { useDialog } from '../../contexts/dialog'
-import { WalletdAuthedLayout } from '../WalletdAuthedLayout'
-import { WalletdSidenav } from '../WalletdSidenav'
-import { AddressesActionsMenu } from './AddressesActionsMenu'
-import { useRouter } from 'next/router'
+import { Table } from '@siafoundation/design-system'
import { useAddresses } from '../../contexts/addresses'
import { StateNoneMatching } from './StateNoneMatching'
import { StateNoneYet } from './StateNoneYet'
import { StateError } from './StateError'
-import { useWallets } from '../../contexts/wallets'
-import { AddressesFiltersBar } from './AddressesFilterBar'
export function WalletAddresses() {
- const router = useRouter()
- const id = router.query.id as string
- const { openDialog } = useDialog()
- const { wallet } = useWallets()
const {
dataset,
dataState,
@@ -29,61 +17,27 @@ export function WalletAddresses() {
} = useAddresses()
return (
- }
- openSettings={() => openDialog('settings')}
- title={wallet?.name}
- navTitle={
-
-
- {truncate(wallet?.name, 20)}
-
-
- /
-
-
- Addresses
-
-
- }
- actions={}
- stats={}
- size="3"
- >
-
-
- ) : dataState === 'noneYet' ? (
-
- ) : dataState === 'error' ? (
-
- ) : null
- }
- pageSize={6}
- data={dataset}
- context={cellContext}
- columns={columns}
- sortableColumns={sortableColumns}
- sortDirection={sortDirection}
- sortField={sortField}
- toggleSort={toggleSort}
- />
-
-
+
+
+ ) : dataState === 'noneYet' ? (
+
+ ) : dataState === 'error' ? (
+
+ ) : null
+ }
+ pageSize={6}
+ data={dataset}
+ context={cellContext}
+ columns={columns}
+ sortableColumns={sortableColumns}
+ sortDirection={sortDirection}
+ sortField={sortField}
+ toggleSort={toggleSort}
+ />
+
)
}
diff --git a/apps/walletd/components/WalletdAuthedLayout.tsx b/apps/walletd/components/WalletdAuthedLayout.tsx
index da787cc2f..128143fcb 100644
--- a/apps/walletd/components/WalletdAuthedLayout.tsx
+++ b/apps/walletd/components/WalletdAuthedLayout.tsx
@@ -4,14 +4,12 @@ import { useSyncStatus } from '../hooks/useSyncStatus'
import { Profile } from './Profile'
import { WalletdTestnetWarningBanner } from './WalletdTestnetWarningBanner'
-type Props = React.ComponentProps
+type Props = Omit<
+ React.ComponentProps,
+ 'appName' | 'connectivityRoute' | 'walletBalance' | 'profile' | 'isSynced'
+>
-export function WalletdAuthedLayout(
- props: Omit<
- Props,
- 'appName' | 'connectivityRoute' | 'walletBalance' | 'profile' | 'isSynced'
- >
-) {
+export function WalletdAuthedLayout(props: Props) {
const { isSynced } = useSyncStatus()
return (
)
}
+
+export type WalletdAuthedPageLayoutProps = Omit
diff --git a/apps/walletd/components/WalletdPublicLayout.tsx b/apps/walletd/components/WalletdPublicLayout.tsx
index 0f2a90200..0b492d735 100644
--- a/apps/walletd/components/WalletdPublicLayout.tsx
+++ b/apps/walletd/components/WalletdPublicLayout.tsx
@@ -1,7 +1,9 @@
import { AppPublicLayout } from '@siafoundation/design-system'
-type Props = React.ComponentProps
+type Props = Omit, 'appName'>
-export function WalletdPublicLayout(props: Omit) {
+export function WalletdPublicLayout(props: Props) {
return
}
+
+export type WalletdPublicPageLayoutProps = Omit
diff --git a/apps/walletd/components/WalletsList/Layout.tsx b/apps/walletd/components/WalletsList/Layout.tsx
new file mode 100644
index 000000000..8f084482d
--- /dev/null
+++ b/apps/walletd/components/WalletsList/Layout.tsx
@@ -0,0 +1,23 @@
+import { routes } from '../../config/routes'
+import { useDialog } from '../../contexts/dialog'
+import {
+ WalletdAuthedLayout,
+ WalletdAuthedPageLayoutProps,
+} from '../WalletdAuthedLayout'
+import { WalletdSidenav } from '../WalletdSidenav'
+import { WalletsActionsMenu } from './WalletsActionsMenu'
+import { WalletsFiltersBar } from './WalletsFiltersBar'
+
+export const Layout = WalletdAuthedLayout
+export function useLayoutProps(): WalletdAuthedPageLayoutProps {
+ const { openDialog } = useDialog()
+ return {
+ title: 'Wallets',
+ routes,
+ sidenav: ,
+ openSettings: () => openDialog('settings'),
+ actions: ,
+ stats: ,
+ size: '3',
+ }
+}
diff --git a/apps/walletd/components/WalletsList/index.tsx b/apps/walletd/components/WalletsList/index.tsx
index 989eb532a..16b0cb4b7 100644
--- a/apps/walletd/components/WalletsList/index.tsx
+++ b/apps/walletd/components/WalletsList/index.tsx
@@ -1,17 +1,10 @@
import { Table } from '@siafoundation/design-system'
import { useWallets } from '../../contexts/wallets'
-import { routes } from '../../config/routes'
-import { useDialog } from '../../contexts/dialog'
-import { WalletdAuthedLayout } from '../WalletdAuthedLayout'
-import { WalletdSidenav } from '../WalletdSidenav'
-import { WalletsActionsMenu } from './WalletsActionsMenu'
-import { WalletsFiltersBar } from './WalletsFiltersBar'
import { StateNoneYet } from './StateNoneYet'
import { StateNoneMatching } from './StateNoneMatching'
import { StateError } from './StateError'
export function WalletsList() {
- const { openDialog } = useDialog()
const {
dataset,
dataState,
@@ -24,39 +17,29 @@ export function WalletsList() {
} = useWallets()
return (
- }
- openSettings={() => openDialog('settings')}
- title="Wallets"
- actions={}
- stats={}
- size="3"
- >
-
- {dataState === 'noneYet' &&
}
- {dataState !== 'noneYet' && (
-
- ) : dataState === 'error' ? (
-
- ) : null
- }
- pageSize={6}
- data={dataset}
- context={context}
- columns={columns}
- sortableColumns={sortableColumns}
- sortDirection={sortDirection}
- sortField={sortField}
- toggleSort={toggleSort}
- />
- )}
-
-
+
+ {dataState === 'noneYet' &&
}
+ {dataState !== 'noneYet' && (
+
+ ) : dataState === 'error' ? (
+
+ ) : null
+ }
+ pageSize={6}
+ data={dataset}
+ context={context}
+ columns={columns}
+ sortableColumns={sortableColumns}
+ sortDirection={sortDirection}
+ sortField={sortField}
+ toggleSort={toggleSort}
+ />
+ )}
+
)
}
diff --git a/apps/walletd/pages/_app.tsx b/apps/walletd/pages/_app.tsx
index 654a84a22..02790f645 100644
--- a/apps/walletd/pages/_app.tsx
+++ b/apps/walletd/pages/_app.tsx
@@ -4,23 +4,40 @@ import { AppProps } from 'next/app'
import { Providers } from '../config/providers'
import { routes } from '../config/routes'
import { rootFontClasses } from '@siafoundation/fonts'
+import { NextPage } from 'next'
-export default function App({
- Component,
- pageProps,
-}: AppProps<{
+type NextPageWithLayout = NextPage & {
+ Layout: ({ children }: { children: React.ReactElement }) => React.ReactNode
+ useLayoutProps: () => Record
+}
+
+type AppPropsWithLayout = AppProps<{
fallback?: Record
-}>) {
+}> & {
+ Component: NextPageWithLayout
+}
+
+export default function App(props: AppPropsWithLayout) {
return (
-
+
)
}
+function AppCore({ Component, pageProps }: AppPropsWithLayout) {
+ const Layout = Component.Layout
+ const layoutProps = Component.useLayoutProps()
+ const { fallback, ...rest } = pageProps
+ return (
+
+
+
+ )
+}
diff --git a/apps/walletd/pages/index.tsx b/apps/walletd/pages/index.tsx
index 0c37a8f7e..a105609ac 100644
--- a/apps/walletd/pages/index.tsx
+++ b/apps/walletd/pages/index.tsx
@@ -1,5 +1,9 @@
import { WalletsList } from '../components/WalletsList'
+import { Layout, useLayoutProps } from '../components/WalletsList/Layout'
-export default function HomePage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/walletd/pages/login.tsx b/apps/walletd/pages/login.tsx
index 4d416fb2b..cf237134d 100644
--- a/apps/walletd/pages/login.tsx
+++ b/apps/walletd/pages/login.tsx
@@ -1,5 +1,9 @@
import { Login } from '../components/Login'
+import { Layout, useLayoutProps } from '../components/Login/Layout'
-export default function LoginPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/walletd/pages/node/index.tsx b/apps/walletd/pages/node/index.tsx
index 1e780e299..95577b5cf 100644
--- a/apps/walletd/pages/node/index.tsx
+++ b/apps/walletd/pages/node/index.tsx
@@ -1,5 +1,9 @@
import { Node } from '../../components/Node'
+import { Layout, useLayoutProps } from '../../components/Node/Layout'
-export default function NodePage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/walletd/pages/wallets/[id]/addresses.tsx b/apps/walletd/pages/wallets/[id]/addresses.tsx
index 23a5e75f6..ac31e3fdd 100644
--- a/apps/walletd/pages/wallets/[id]/addresses.tsx
+++ b/apps/walletd/pages/wallets/[id]/addresses.tsx
@@ -1,5 +1,12 @@
import { WalletAddresses } from '../../../components/WalletAddresses'
+import {
+ Layout,
+ useLayoutProps,
+} from '../../../components/WalletAddresses/Layout'
-export default function WalletAddressesPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps
diff --git a/apps/walletd/pages/wallets/[id]/index.tsx b/apps/walletd/pages/wallets/[id]/index.tsx
index 5ad746d7c..b31155fb8 100644
--- a/apps/walletd/pages/wallets/[id]/index.tsx
+++ b/apps/walletd/pages/wallets/[id]/index.tsx
@@ -1,5 +1,9 @@
import { Wallet } from '../../../components/Wallet'
+import { Layout, useLayoutProps } from '../../../components/Wallet/Layout'
-export default function WalletPage() {
+export default function Page() {
return
}
+
+Page.Layout = Layout
+Page.useLayoutProps = useLayoutProps