PHP 8.2.30
Preview: dashboard.js Size: 1.05 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/frontend/components/routes/dashboard.js

import React from 'react';
import { connect } from 'react-redux';
import DefaultDashboard from '../app/default-dashboard.js';
import ErrorBoundary from '../app/error-boundary.js';
import allowOverride from '../../hoc/allow-override.js';
class Dashboard extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      isClient: false
    };
  }
  componentDidMount() {
    this.setState({
      isClient: true
    });
  }
  render() {
    const {
      dashboard
    } = this.props;
    const {
      isClient
    } = this.state;
    let Component;
    if (dashboard && dashboard.component && isClient && AdminJS.UserComponents[dashboard.component]) {
      Component = AdminJS.UserComponents[dashboard.component];
    } else {
      Component = DefaultDashboard;
    }
    return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(Component, null));
  }
}
const mapStateToProps = state => ({
  dashboard: state.dashboard
});
export default allowOverride(connect(mapStateToProps)(Dashboard), 'DashboardRoute');

Directory Contents

Dirs: 1 × Files: 8

Name Size Perms Modified Actions
utils DIR
- drwxr-xr-x 2026-02-28 00:31:52
Edit Download
4.65 KB lrw-r--r-- 2026-02-28 00:31:24
Edit Download
1.05 KB lrw-r--r-- 2026-02-28 00:31:26
Edit Download
368 B lrw-r--r-- 2026-02-28 00:31:44
Edit Download
1.71 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
5.83 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
2.02 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
3.58 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download
3.11 KB lrw-r--r-- 2026-02-28 00:31:48
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).