diff --git a/packages/insomnia/src/ui/components/wrapper.tsx b/packages/insomnia/src/ui/components/wrapper.tsx index 5b8fc4452..ba08a862a 100644 --- a/packages/insomnia/src/ui/components/wrapper.tsx +++ b/packages/insomnia/src/ui/components/wrapper.tsx @@ -33,7 +33,7 @@ import { VCS } from '../../sync/vcs/vcs'; import { CookieModifyModal } from '../components/modals/cookie-modify-modal'; import { AppProps } from '../containers/app'; import { GrpcDispatchModalWrapper } from '../context/grpc'; -import { selectActiveActivity } from '../redux/selectors'; +import { selectActiveActivity, selectActiveWorkspace } from '../redux/selectors'; import { DropdownButton } from './base/dropdown/dropdown-button'; import GitSyncDropdown from './dropdowns/git-sync-dropdown'; import { ErrorBoundary } from './error-boundary'; @@ -109,7 +109,10 @@ preloadWrapperDesign(); preloadWrapperUnitTest(); const ActivityRouter = () => { - const activity = useSelector(selectActiveActivity); + const selectedActivity = useSelector(selectActiveActivity); + const activeWorkspace = useSelector(selectActiveWorkspace); + // If there is no active workspace, we want to navigate to home no matter what the previous activity was + const activity = activeWorkspace ? selectedActivity : ACTIVITY_HOME; const navigate = useNavigate(); React.useEffect(() => {