DashboardPack / architectui-react-theme-free

ArchitectUI React admin template is a simple yet fully customizable admin dashboard for web apps and other software.

Home Page:https://dashboardpack.com/theme-details/architectui-dashboard-react-pro/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shows blank white screen

chetanparmar95 opened this issue · comments

When I run yarn start output is blank white screen.

I bought the pro version and it has the same issue with a white screen. I managed to track down the problem and had to modify the main page component. Basically the ResizeDetector component doesn't work as expected anymore. So I used the onResize callback to set a width state. This is my modified code.

class Main extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            closedSmallerSidebar: false,
            width: undefined
        };

    }

    onResize = (width) => this.setState({ width });

    render() {
        const { width } = this.state;

        let {
            colorScheme,
            enableFixedHeader,
            enableFixedSidebar,
            enableFixedFooter,
            enableClosedSidebar,
            closedSmallerSidebar,
            enableMobileMenu,
            enablePageTabsAlt,
        } = this.props;

        return (
            <Fragment>
                <div className={cx(
                    "app-container app-theme-" + colorScheme,
                    {'fixed-header': enableFixedHeader},
                    {'fixed-sidebar': enableFixedSidebar || width < 1250},
                    {'fixed-footer': enableFixedFooter},
                    {'closed-sidebar': enableClosedSidebar || width < 1250},
                    {'closed-sidebar-mobile': closedSmallerSidebar || width < 1250},
                    {'sidebar-mobile-open': enableMobileMenu},
                )}>
                    <AppMain/>
                    <ResizeDetector handleWidth onResize={this.onResize} />
                </div>
            </Fragment>
        )
    }
}

But before I even managed to start the project in dev mode I got an error saying Cannot read property 'entryOption' of undefined. I fixed that by removing the ^ symbol from "webpack-dev-server": "3.0.0" inside the package.json file.

It worked for me. thanks