index.tsx 649 B

1234567891011121314151617181920
  1. import LeftSide from '@/components/LeftSide'
  2. import Guards from '@/components/Navigation'
  3. import { NavigationGuardsProps } from '@/types/router'
  4. import React from 'react'
  5. import { Switch } from 'react-router-dom'
  6. const Content:React.FC<NavigationGuardsProps> = props => {
  7. const { routeConfig, match, location } = props
  8. return (
  9. <>
  10. <LeftSide childRoutes={routeConfig} location={location}></LeftSide>
  11. <div className="panel-content">
  12. <Switch>
  13. <Guards routeConfig={routeConfig} match={match} location={location}></Guards>
  14. </Switch>
  15. </div>
  16. </>
  17. )
  18. }
  19. export default Content