mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ui.git
				synced 2025-10-31 02:37:54 +00:00 
			
		
		
		
	undo
This commit is contained in:
		| @@ -1,5 +1,5 @@ | |||||||
| import React, { useMemo, useContext, useState } from 'react'; | import React, { useMemo, useContext, useState } from 'react'; | ||||||
| import { Switch, Route, useRouteMatch, Redirect, useLocation } from 'react-router-dom'; | import { Switch, Route, useRouteMatch, Redirect } from 'react-router-dom'; | ||||||
| import { useQuery, useMutation, useLazyQuery } from '@apollo/react-hooks'; | import { useQuery, useMutation, useLazyQuery } from '@apollo/react-hooks'; | ||||||
| import { Alert, notification } from 'antd'; | import { Alert, notification } from 'antd'; | ||||||
| import _ from 'lodash'; | import _ from 'lodash'; | ||||||
| @@ -22,7 +22,6 @@ import { | |||||||
|  |  | ||||||
| const Network = () => { | const Network = () => { | ||||||
|   const { path } = useRouteMatch(); |   const { path } = useRouteMatch(); | ||||||
|   const location = useLocation(); |  | ||||||
|   const { customerId } = useContext(UserContext); |   const { customerId } = useContext(UserContext); | ||||||
|   const { loading, error, refetch, data } = useQuery(GET_ALL_LOCATIONS, { |   const { loading, error, refetch, data } = useQuery(GET_ALL_LOCATIONS, { | ||||||
|     variables: { customerId }, |     variables: { customerId }, | ||||||
| @@ -259,13 +258,22 @@ const Network = () => { | |||||||
|           path={`${path}/access-points/:id/:tab`} |           path={`${path}/access-points/:id/:tab`} | ||||||
|           render={props => <AccessPointDetails locations={locationsTree} {...props} />} |           render={props => <AccessPointDetails locations={locationsTree} {...props} />} | ||||||
|         /> |         /> | ||||||
|  |         <Route | ||||||
|  |           exact | ||||||
|  |           path={`${path}/access-points/:id`} | ||||||
|  |           render={props => ( | ||||||
|  |             <Redirect | ||||||
|  |               to={{ pathname: `${path}/access-points/${props?.match?.params?.id}/general` }} | ||||||
|  |             /> | ||||||
|  |           )} | ||||||
|  |         /> | ||||||
|  |  | ||||||
|         <Route |         <Route | ||||||
|           exact |           exact | ||||||
|           path={`${path}/client-devices`} |           path={`${path}/client-devices`} | ||||||
|           render={props => <ClientDevices checkedLocations={checkedLocations} {...props} />} |           render={props => <ClientDevices checkedLocations={checkedLocations} {...props} />} | ||||||
|         /> |         /> | ||||||
|         <Route exact path={`${path}/client-devices/:id`} component={ClientDeviceDetails} /> |         <Route exact path={`${path}/client-devices/:id`} component={ClientDeviceDetails} /> | ||||||
|         <Redirect from={location.pathname} to={`${location.pathname}/general`} /> |  | ||||||
|         <Redirect from={path} to={`${path}/access-points`} /> |         <Redirect from={path} to={`${path}/access-points`} /> | ||||||
|       </Switch> |       </Switch> | ||||||
|     </NetworkPage> |     </NetworkPage> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Irtiza-h30
					Irtiza-h30