mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: useLocation from react-router (#706)
This commit is contained in:
		
							parent
							
								
									f8c54a6827
								
							
						
					
					
						commit
						02d6a57e02
					
				| @ -81,7 +81,7 @@ export const App = () => { | ||||
|                                 <EnvironmentSplash onFinish={refetchSplash} /> | ||||
|                             } | ||||
|                             elseShow={ | ||||
|                                 <LayoutPicker location={location}> | ||||
|                                 <LayoutPicker> | ||||
|                                     <Switch> | ||||
|                                         <ProtectedRoute | ||||
|                                             exact | ||||
|  | ||||
| @ -1,8 +1,10 @@ | ||||
| import ConditionallyRender from '../../common/ConditionallyRender'; | ||||
| import { matchPath } from 'react-router'; | ||||
| import { useLocation } from 'react-router-dom'; | ||||
| import { MainLayout } from '../MainLayout/MainLayout'; | ||||
| 
 | ||||
| const LayoutPicker = ({ children, location }) => { | ||||
| const LayoutPicker = ({ children }) => { | ||||
|     const location = useLocation(); | ||||
|     const standalonePages = () => { | ||||
|         const { pathname } = location; | ||||
|         const isLoginPage = matchPath(pathname, { path: '/login' }); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user