mirror of
https://github.com/strapi/strapi.git
synced 2025-09-07 15:49:24 +00:00
Fix review issues
This commit is contained in:
parent
0509d4c97f
commit
2e24f87b4c
@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { useQuery } from '@strapi/helper-plugin';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Box, Row, TableLabel } from '@strapi/parts';
|
||||
import { MultiSelectNested } from '@strapi/parts/Select';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
|
||||
const UpperFirst = ({ content }) => upperFirst(content);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Checkbox, BaseCheckbox } from '@strapi/parts';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
|
||||
const EventRow = ({ disabledEvents, name, events, inputValue, handleChange, handleChangeAll }) => {
|
||||
const enabledCheckboxes = events.filter(event => {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { Stack, FieldLabel, P, TableLabel } from '@strapi/parts';
|
||||
import { FieldLabel, P, Stack, TableLabel } from '@strapi/parts';
|
||||
import { useFormikContext } from 'formik';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { FormattedMessage, useIntl } from 'react-intl';
|
||||
import { useIntl } from 'react-intl';
|
||||
import styled from 'styled-components';
|
||||
import EventRow from './EventRow';
|
||||
import formatValue from './utils/formatValue';
|
||||
@ -111,15 +111,16 @@ const EventInput = ({ isDraftAndPublish }) => {
|
||||
{headersName.map(header => {
|
||||
if (header === 'app.utils.publish' || header === 'app.utils.unpublish') {
|
||||
return (
|
||||
<FormattedMessage id="Settings.webhooks.event.publish-tooltip" key={header}>
|
||||
{msg => (
|
||||
<td title={msg}>
|
||||
<TableLabel textColor="neutral600">
|
||||
{formatMessage({ id: header })}
|
||||
</TableLabel>
|
||||
<td
|
||||
key={header}
|
||||
title={formatMessage({
|
||||
id: 'Settings.webhooks.event.publish-tooltip',
|
||||
defaultMessage:
|
||||
'This event only exists for contents with Draft/Publish system enabled',
|
||||
})}
|
||||
>
|
||||
<TableLabel textColor="neutral600">{formatMessage({ id: header })}</TableLabel>
|
||||
</td>
|
||||
)}
|
||||
</FormattedMessage>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,11 @@ const HeadersInput = () => {
|
||||
name={`headers.${i}.key`}
|
||||
aria-label={`row ${i + 1} key`}
|
||||
error={
|
||||
errors.headers?.[i]?.key && formatMessage({ id: errors.headers[i]?.key })
|
||||
errors.headers?.[i]?.key &&
|
||||
formatMessage({
|
||||
id: errors.headers[i]?.key,
|
||||
defaultMessage: errors.headers[i]?.key,
|
||||
})
|
||||
}
|
||||
/>
|
||||
</GridItem>
|
||||
@ -62,7 +66,10 @@ const HeadersInput = () => {
|
||||
name={`headers.${i}.value`}
|
||||
error={
|
||||
errors.headers?.[i]?.value &&
|
||||
formatMessage({ id: errors.headers[i]?.value })
|
||||
formatMessage({
|
||||
id: errors.headers[i]?.value,
|
||||
defaultMessage: errors.headers[i]?.value,
|
||||
})
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
|
@ -88,7 +88,10 @@ const WebhookForm = ({
|
||||
}
|
||||
navigationAction={
|
||||
<Link startIcon={<BackIcon />} to="/settings/webhooks">
|
||||
Go back
|
||||
{formatMessage({
|
||||
id: 'app.components.go-back',
|
||||
defaultMessage: 'Go back',
|
||||
})}
|
||||
</Link>
|
||||
}
|
||||
as="h1"
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
ModalForm,
|
||||
} from '@strapi/helper-plugin';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import { AttributeIcon, Button } from '@buffetjs/core';
|
||||
|
||||
const PopupForm = ({
|
||||
|
@ -202,6 +202,7 @@
|
||||
"Users.components.List.empty": "There is no users...",
|
||||
"Users.components.List.empty.withFilters": "There is no users with the applied filters...",
|
||||
"Users.components.List.empty.withSearch": "There is no users corresponding to the search ({search})...",
|
||||
"app.components.go-back": "Go back",
|
||||
"app.components.ToggleCheckbox.on-label": "On",
|
||||
"app.components.ToggleCheckbox.off-label": "Off",
|
||||
"app.components.BlockLink.code": "Code examples",
|
||||
|
@ -2,7 +2,7 @@ import React, { useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Select from 'react-select';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import MenuList from './MenuList';
|
||||
import getTrad from '../../utils/getTrad';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { components } from 'react-select';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import { useQuery } from '@strapi/helper-plugin';
|
||||
import useDataManager from '../../hooks/useDataManager';
|
||||
import Ul from '../SelectMenuUl';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
|
||||
const UpperFirst = ({ content }) => upperFirst(content);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
|
||||
const generateAllowedActions = permissionsNames =>
|
||||
permissionsNames.reduce((acc, current) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
|
||||
const generateResultsObject = array =>
|
||||
array.reduce((acc, current) => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
|
||||
import Wrapper from './Wrapper';
|
||||
import RemoveButton from './RemoveButton';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Flex, Padded, Text } from '@buffetjs/core';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { upperFirst } from 'lodash';
|
||||
import upperFirst from 'lodash/upperFirst';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const PrefixedIcon = ({ icon, name }) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user