gitscope
← marzneshin / v0.6.2 / dashboard/src/routes/_dashboard/hosts.lazy.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/routes/_dashboard/hosts.lazy.tsx · TypeScript
Blame Raw
 1import {
 2    Page,
 3    Loading,
 4} from '@marzneshin/components'
 5import { InboundHostsTable } from '@marzneshin/features/hosts'
 6import { SudoRoute } from '@marzneshin/features/sudo-routes'
 7import { createFileRoute, Outlet } from '@tanstack/react-router'
 8import { useTranslation } from 'react-i18next'
 9import { Suspense } from 'react';
10
11export const HostsPage = () => {
12    const { t } = useTranslation()
13    return (
14        <Page title={t('hosts')}>
15            <InboundHostsTable />
16            <Suspense fallback={<Loading />}>
17                <Outlet />
18            </Suspense>
19        </Page>
20    )
21}
22
23export const Route = createFileRoute('/_dashboard/hosts')({
24    component: () => <SudoRoute><HostsPage /></SudoRoute>
25})