import { Box, Flex } from '@chakra-ui/react'; import React from 'react'; import { Navigate, Route, Routes } from 'react-router-dom'; import Sidebar from '../Sidebar'; import Orders from '../Orders'; import Masters from '../Masters'; import { URLs } from '../../__data__/urls'; const LayoutArm = () => { let defaultRedirect = null; if (URLs.armOrder.isOn) { defaultRedirect = URLs.armOrder.url; } else if (URLs.armMaster.isOn) { defaultRedirect = URLs.armMaster.url; } return ( } /> {URLs.armOrder.isOn && ( } /> )} {URLs.armMaster.isOn && ( } /> )} ); }; export default LayoutArm;