There is a Maximum call stack size exceeded problem in react-router

import React, { Component } from "react"
import { BrowserRouter as Router, Route, Switch, Redirect } from "react-router-dom"

import Path from "../containers/page"
import Login from "../containers/login"

const LoginRoute = ({ component: Component, ...rest }) => (
    <Route {...rest} render = {
        props => 0 ? 
        (
            <Component {...props} />
        ) : (
            <Redirect to={{
                pathname: "/login",
                state: {from: props.location}
            }} />
        )
    } /> 
)

class Routes extends Component {
    render () {
        return (
            <Router>
                <Switch>
                    <LoginRoute exact component={Path} path="/" />
                    <LoginRoute component={Login} path="/login" />
                </Switch>
            </Router>
        )
    }
}

export default Routes

clipboard.png

Feb.27,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea0ede-46597.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea0ede-46597.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?