mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-23 07:14:21 +00:00
🔧 Fix ResourceRouter, as the previous behaviour is no longer needed
This commit is contained in:
parent
54dbb35724
commit
53b62f92ac
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