console: fix routing for Import OAS "Modify" button

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8203
Co-authored-by: Daniele Cammareri <5709409+dancamma@users.noreply.github.com>
GitOrigin-RevId: 8fa100f710ff2ebd034263ad2299ebe93c6ebfe8
This commit is contained in:
Varun Choudhary 2023-03-07 11:21:41 +05:30 committed by hasura-bot
parent d306eda79a
commit e82c82b181
2 changed files with 9 additions and 3 deletions

View File

@ -8,6 +8,7 @@ import LeftSubSidebar from '../../../Common/Layout/LeftSubSidebar/LeftSubSidebar
import styles from '../../../Common/Layout/LeftSubSidebar/LeftSubSidebar.module.scss';
import { isProConsole } from '../../../../utils';
import { Badge } from '../../../../new-components/Badge';
import globals from '../../../../Globals';
const LeftSidebar = ({
appPrefix,
@ -121,7 +122,9 @@ const LeftSidebar = ({
<div
className="py-1 "
onClick={() => {
browserHistory.push(`${appPrefix}/manage/add`);
browserHistory.push(
`${globals.urlPrefix}${appPrefix}/manage/add`
);
}}
>
<FaEdit className="relative -top-[1px]" /> New Action
@ -131,7 +134,9 @@ const LeftSidebar = ({
<div
className="py-1 "
onClick={() => {
browserHistory.push(`${appPrefix}/manage/add-oas`);
browserHistory.push(
`${globals.urlPrefix}${appPrefix}/manage/add-oas`
);
}}
>
<FaFileImport className="relative -left-[2px] -top-[1px]" />{' '}

View File

@ -4,6 +4,7 @@ import clsx from 'clsx';
import React from 'react';
import { FaChevronDown, FaExternalLinkAlt } from 'react-icons/fa';
import { Operation } from './types';
import globals from '../../../../Globals';
export interface OasGeneratorActionsProps {
operation: Operation;
@ -50,7 +51,7 @@ export const OasGeneratorActions: React.FC<
size="sm"
onClick={e => {
window.open(
`/actions/manage/${operation.operationId}/modify`,
`${globals.urlPrefix}/actions/manage/${operation.operationId}/modify`,
'_blank'
);
}}