File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ const UnitInfo = () => {
8484 >
8585 { renderTab ( UNIT_INFO_TABS . Preview , < LibraryUnitBlocks /> , intl . formatMessage ( messages . previewTabTitle ) ) }
8686 { renderTab ( UNIT_INFO_TABS . Organize , < ContainerOrganize /> , intl . formatMessage ( messages . organizeTabTitle ) ) }
87- { renderTab ( UNIT_INFO_TABS . Settings , " Unit Settings" , intl . formatMessage ( messages . settingsTabTitle ) ) }
87+ { renderTab ( UNIT_INFO_TABS . Settings , ' Unit Settings' , intl . formatMessage ( messages . settingsTabTitle ) ) }
8888 </ Tabs >
8989 </ Stack >
9090 ) ;
Original file line number Diff line number Diff line change @@ -124,9 +124,14 @@ export const useLibraryRoutes = (): LibraryRoutesData => {
124124 // optionally selecting a component.
125125 route = ROUTES . COMPONENTS ;
126126 } else if ( insideUnits ) {
127- // We're inside the Units tab, so stay there,
128- // optionally selecting a unit.
129- route = ROUTES . UNITS ;
127+ // We're inside the units tab,
128+ route = (
129+ ( unitId && unitId === ( urlUnitId || urlSelectedItemId ) )
130+ // now open the previously-selected unit,
131+ ? ROUTES . UNIT
132+ // or stay there to list all units, or a selected unit.
133+ : ROUTES . UNITS
134+ ) ;
130135 } else if ( insideUnit ) {
131136 // We're viewing a Unit, so stay there,
132137 // and optionally select a component in that Unit.
You can’t perform that action at this time.
0 commit comments