mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Redirect to the project view if no active workspace (#4882)
This commit is contained in:
parent
07706d093a
commit
38a53e603b
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user