mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 06:44:21 +00:00
🔧 Fix ResourceRouter, as the previous behaviour is no longer needed
This commit is contained in:
parent
559499ae44
commit
30b2091b97
1 changed files with 1 additions and 3 deletions
|
@ -24,7 +24,6 @@ export function ResourceRouter<Resource>({selection, unselectedRoute, selectedRo
|
|||
const UnselectedRoute = unselectedRoute
|
||||
const SelectedRoute = selectedRoute
|
||||
|
||||
// This component **intentionally** has a incomplete dependency array to avoid routes being re-rendered every time the parent changes.
|
||||
return React.useMemo(
|
||||
() => {
|
||||
if(selection) {
|
||||
|
@ -36,7 +35,6 @@ export function ResourceRouter<Resource>({selection, unselectedRoute, selectedRo
|
|||
<UnselectedRoute/>
|
||||
)
|
||||
},
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[selection],
|
||||
[selection, selectedRoute, unselectedRoute],
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue