Skip to content

Commit

Permalink
fix(dark-mode-enabler): remove re-render layout with key (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet authored Mar 8, 2023
1 parent 3d77325 commit c6d8d66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/console/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ export function App() {
path={route.path}
element={
!route.protected ? (
<DarkModeEnabler key={'dark-mode-' + route.path} isDarkMode={route.darkMode}>
<DarkModeEnabler isDarkMode={route.darkMode}>
<Layout topBar={route.topBar}>{route.component}</Layout>
</DarkModeEnabler>
) : (
<ProtectedRoute>
<DarkModeEnabler key={'dark-mode-' + route.path} isDarkMode={route.darkMode}>
<DarkModeEnabler isDarkMode={route.darkMode}>
<Layout topBar={route.topBar}>{route.component}</Layout>
</DarkModeEnabler>
</ProtectedRoute>
Expand Down

0 comments on commit c6d8d66

Please sign in to comment.