mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 09:26:47 +00:00
hotfix: choose env when opening a dashboard link
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
|||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import { yupResolver } from '@hookform/resolvers/yup';
|
import { yupResolver } from '@hookform/resolvers/yup';
|
||||||
|
import queryString from 'query-string';
|
||||||
import * as yup from 'yup';
|
import * as yup from 'yup';
|
||||||
|
|
||||||
import { useNotificationContext } from '@app/components/context/Notifications/NotificationProvider';
|
import { useNotificationContext } from '@app/components/context/Notifications/NotificationProvider';
|
||||||
@@ -158,7 +159,10 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
.map((workspace: { _id: string }) => workspace._id)
|
.map((workspace: { _id: string }) => workspace._id)
|
||||||
.includes(intendedWorkspaceId)
|
.includes(intendedWorkspaceId)
|
||||||
) {
|
) {
|
||||||
router.push(`/dashboard/${userWorkspaces[0]._id}`);
|
const { env } = queryString.parse(router.asPath.split('?')[1]);
|
||||||
|
if (!env) {
|
||||||
|
router.push(`/dashboard/${userWorkspaces[0]._id}`);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setWorkspaceMapping(
|
setWorkspaceMapping(
|
||||||
Object.fromEntries(
|
Object.fromEntries(
|
||||||
|
|||||||
Reference in New Issue
Block a user