mirror of
https://github.com/strapi/strapi.git
synced 2025-11-09 22:59:14 +00:00
Remove subTargetUid query string
This commit is contained in:
parent
b076cc43ec
commit
3ba4e96957
@ -71,7 +71,7 @@ const AttributeOption = forwardRef(({ tabIndex, type }, ref) => {
|
|||||||
targetUid,
|
targetUid,
|
||||||
attributeType: type,
|
attributeType: type,
|
||||||
step: type === 'component' ? '1' : null,
|
step: type === 'component' ? '1' : null,
|
||||||
subTargetUid: query.get('subTargetUid'),
|
|
||||||
header_label_1,
|
header_label_1,
|
||||||
header_info_name_1,
|
header_info_name_1,
|
||||||
header_info_category_1,
|
header_info_category_1,
|
||||||
|
|||||||
@ -1,69 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
||||||
import UpperFirst from '../UpperFirst';
|
|
||||||
import ComponentInfos from './ComponentInfos';
|
|
||||||
import IconWrapper from './IconWrapper';
|
|
||||||
|
|
||||||
const Header = ({
|
|
||||||
category,
|
|
||||||
name,
|
|
||||||
subCategory,
|
|
||||||
target,
|
|
||||||
targetUid,
|
|
||||||
subTargetUid,
|
|
||||||
}) => {
|
|
||||||
const shouldDisplayComponentCatInfos = target === 'components';
|
|
||||||
|
|
||||||
const content = (
|
|
||||||
<>
|
|
||||||
<span>
|
|
||||||
<UpperFirst content={category} />
|
|
||||||
</span>
|
|
||||||
<IconWrapper>
|
|
||||||
<FontAwesomeIcon icon="chevron-right" />
|
|
||||||
</IconWrapper>
|
|
||||||
{subCategory && (
|
|
||||||
<>
|
|
||||||
<span>
|
|
||||||
<UpperFirst content={subCategory} />
|
|
||||||
</span>
|
|
||||||
<ComponentInfos uid={subTargetUid} />
|
|
||||||
<IconWrapper>
|
|
||||||
<FontAwesomeIcon icon="chevron-right" />
|
|
||||||
</IconWrapper>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{category && content}
|
|
||||||
<span>
|
|
||||||
<UpperFirst content={name} />
|
|
||||||
</span>
|
|
||||||
{shouldDisplayComponentCatInfos && <ComponentInfos uid={targetUid} />}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
Header.defaultProps = {
|
|
||||||
category: null,
|
|
||||||
name: null,
|
|
||||||
subCategory: null,
|
|
||||||
subTargetUid: null,
|
|
||||||
target: null,
|
|
||||||
targetUid: null,
|
|
||||||
};
|
|
||||||
|
|
||||||
Header.propTypes = {
|
|
||||||
category: PropTypes.string,
|
|
||||||
name: PropTypes.string,
|
|
||||||
subCategory: PropTypes.string,
|
|
||||||
subTargetUid: PropTypes.string,
|
|
||||||
target: PropTypes.string,
|
|
||||||
targetUid: PropTypes.string,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Header;
|
|
||||||
@ -85,7 +85,6 @@ const FormModal = () => {
|
|||||||
const modalType = query.get('modalType');
|
const modalType = query.get('modalType');
|
||||||
const targetUid = query.get('targetUid');
|
const targetUid = query.get('targetUid');
|
||||||
const settingType = query.get('settingType');
|
const settingType = query.get('settingType');
|
||||||
const subTargetUid = query.get('subTargetUid');
|
|
||||||
const headerId = query.get('headerId');
|
const headerId = query.get('headerId');
|
||||||
const header_label_1 = query.get('header_label_1');
|
const header_label_1 = query.get('header_label_1');
|
||||||
const header_icon_name_1 = query.get('header_icon_name_1');
|
const header_icon_name_1 = query.get('header_icon_name_1');
|
||||||
@ -127,7 +126,6 @@ const FormModal = () => {
|
|||||||
modalType,
|
modalType,
|
||||||
pathToSchema,
|
pathToSchema,
|
||||||
settingType,
|
settingType,
|
||||||
subTargetUid,
|
|
||||||
step,
|
step,
|
||||||
targetUid,
|
targetUid,
|
||||||
header_label_1,
|
header_label_1,
|
||||||
|
|||||||
@ -10,7 +10,6 @@ const INITIAL_STATE_DATA = {
|
|||||||
pathToSchema: [],
|
pathToSchema: [],
|
||||||
settingType: null,
|
settingType: null,
|
||||||
step: null,
|
step: null,
|
||||||
subTargetUid: null,
|
|
||||||
targetUid: null,
|
targetUid: null,
|
||||||
headerId: null,
|
headerId: null,
|
||||||
header_label_1: null,
|
header_label_1: null,
|
||||||
|
|||||||
@ -12,7 +12,6 @@ describe('FormModal | utils | createHeadersArray', () => {
|
|||||||
pathToSchema: [],
|
pathToSchema: [],
|
||||||
settingType: null,
|
settingType: null,
|
||||||
step: null,
|
step: null,
|
||||||
subTargetUid: null,
|
|
||||||
targetUid: null,
|
targetUid: null,
|
||||||
headerId: null,
|
headerId: null,
|
||||||
header_label_1: null,
|
header_label_1: null,
|
||||||
@ -47,7 +46,6 @@ describe('FormModal | utils | createHeadersArray', () => {
|
|||||||
pathToSchema: [],
|
pathToSchema: [],
|
||||||
settingType: null,
|
settingType: null,
|
||||||
step: null,
|
step: null,
|
||||||
subTargetUid: null,
|
|
||||||
targetUid: null,
|
targetUid: null,
|
||||||
headerId: null,
|
headerId: null,
|
||||||
header_label_1: 'restaurant',
|
header_label_1: 'restaurant',
|
||||||
@ -95,7 +93,7 @@ describe('FormModal | utils | createHeadersArray', () => {
|
|||||||
pathToSchema: [],
|
pathToSchema: [],
|
||||||
settingType: null,
|
settingType: null,
|
||||||
step: null,
|
step: null,
|
||||||
subTargetUid: null,
|
|
||||||
targetUid: null,
|
targetUid: null,
|
||||||
headerId: null,
|
headerId: null,
|
||||||
header_label_1: 'restaurant',
|
header_label_1: 'restaurant',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user