REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.60 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/frontend/components/routes/page.tsx
Text
Base64
import { InfoBox, Text } from '@adminjs/design-system' import React, { FC, useMemo } from 'react' import { Trans } from 'react-i18next' import { useSelector } from 'react-redux' import { useParams } from 'react-router' import allowOverride from '../../hoc/allow-override.js' import withNoSSR from '../../hoc/with-no-ssr.js' import { useTranslation } from '../../hooks/index.js' import { ReduxState } from '../../store/store.js' import ErrorBoundary from '../app/error-boundary.js' declare const AdminJS: { UserComponents: Record<string, FC>; } type PageRouteProps = { pageName: string; } const Page: FC = () => { const pages = useSelector((state: ReduxState) => state.pages) const params = useParams<PageRouteProps>() const { pageName } = params const { tm } = useTranslation() const currentPage = useMemo(() => pages.find(({ name }) => name === pageName), [pages, pageName]) if (!currentPage) { return ( <InfoBox title={tm('pageNotFound_title')} illustration="NotFound"> <Text mb="xxl"> <Trans i18nKey="messages.pageNotFound_subtitle" values={{ pageName }} components={{ strong: <strong /> }} /> </Text> </InfoBox> ) } const Component = AdminJS.UserComponents[currentPage.component] if (!Component) { return ( <InfoBox title={tm('componentNotFound_title')} illustration="Beware"> <Text mb="xxl"> <Trans i18nKey="messages.componentNotFound_subtitle" /> </Text> </InfoBox> ) } return ( <ErrorBoundary> <Component /> </ErrorBoundary> ) } export default allowOverride(withNoSSR(Page), 'PageRoute')
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
utils
DIR
-
drwxr-xr-x
2026-02-28 00:32:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bulk-action.tsx
4.63 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dashboard.tsx
1.37 KB
lrw-r--r--
2026-02-28 00:32:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
363 B
lrw-r--r--
2026-02-28 00:32:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
page.tsx
1.60 KB
lrw-r--r--
2026-02-28 00:32:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
record-action.spec.tsx
2.12 KB
lrw-r--r--
2026-02-28 00:32:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
record-action.tsx
5.85 KB
lrw-r--r--
2026-02-28 00:32:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
resource-action.tsx
3.47 KB
lrw-r--r--
2026-02-28 00:32:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
resource.tsx
3.26 KB
lrw-r--r--
2026-02-28 00:32:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).