mirror of
https://github.com/strapi/strapi.git
synced 2025-09-08 16:16:21 +00:00
remove mention of Row in favour of Flew
This commit is contained in:
parent
b3c6c298f2
commit
53156190af
12
package.json
12
package.json
@ -70,12 +70,12 @@
|
||||
"prettier:code": "prettier \"**/*.js\"",
|
||||
"prettier:other": "prettier \"**/*.{md,css,scss,yaml,yml}\"",
|
||||
"test:clean": "rimraf ./coverage",
|
||||
"test:front": "npm run test:clean && cross-env TZ=UTC NODE_ENV=test IS_EE=true jest --config ./jest.config.front.js",
|
||||
"test:front:watch": "cross-env TZ=UTC NODE_ENV=test IS_EE=true jest --config ./jest.config.front.js --watchAll",
|
||||
"test:front:update": "cross-env TZ=UTC NODE_ENV=test IS_EE=true jest --config ./jest.config.front.js --u",
|
||||
"test:front:ce": "npm run test:clean && cross-env TZ=UTC NODE_ENV=test IS_EE=false jest --config ./jest.config.front.js --coverage",
|
||||
"test:front:watch:ce": "cross-env TZ=UTC NODE_ENV=test IS_EE=false jest --config ./jest.config.front.js --watchAll",
|
||||
"test:front:update:ce": "cross-env TZ=UTC NODE_ENV=test IS_EE=false jest --config ./jest.config.front.js --u",
|
||||
"test:front": "npm run test:clean && cross-env NODE_ENV=test IS_EE=true jest --config ./jest.config.front.js",
|
||||
"test:front:watch": "cross-env NODE_ENV=test IS_EE=true jest --config ./jest.config.front.js --watchAll",
|
||||
"test:front:update": "cross-env NODE_ENV=test IS_EE=true jest --config ./jest.config.front.js --u",
|
||||
"test:front:ce": "npm run test:clean && cross-env NODE_ENV=test IS_EE=false jest --config ./jest.config.front.js --coverage",
|
||||
"test:front:watch:ce": "cross-env NODE_ENV=test IS_EE=false jest --config ./jest.config.front.js --watchAll",
|
||||
"test:front:update:ce": "cross-env NODE_ENV=test IS_EE=false jest --config ./jest.config.front.js --u",
|
||||
"test:snyk": "snyk test",
|
||||
"test:unit": "jest --verbose",
|
||||
"test:e2e": "FORCE_COLOR=true jest --config jest.config.e2e.js --verbose --runInBand --testRunner=jest-circus/runner --forceExit --detectOpenHandles",
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Text } from '@strapi/parts/Text';
|
||||
import { Tbody, Tr, Td } from '@strapi/parts/Table';
|
||||
import { Row } from '@strapi/parts/Row';
|
||||
import { Flex } from '@strapi/parts/Flex';
|
||||
import { RelativeTime, useQueryParams } from '@strapi/helper-plugin';
|
||||
import { useIntl } from 'react-intl';
|
||||
import PropTypes from 'prop-types';
|
||||
@ -50,7 +50,7 @@ const TableRows = ({ canDelete, canUpdate, onClickDelete, withBulkActions, rows
|
||||
|
||||
{withBulkActions && (
|
||||
<Td>
|
||||
<Row justifyContent="end">
|
||||
<Flex justifyContent="end">
|
||||
{canUpdate && <UpdateButton tokenName={apiToken.name} tokenId={apiToken.id} />}
|
||||
{canDelete && (
|
||||
<DeleteButton
|
||||
@ -58,7 +58,7 @@ const TableRows = ({ canDelete, canUpdate, onClickDelete, withBulkActions, rows
|
||||
onClickDelete={() => onClickDelete(apiToken.id)}
|
||||
/>
|
||||
)}
|
||||
</Row>
|
||||
</Flex>
|
||||
</Td>
|
||||
)}
|
||||
</Tr>
|
||||
|
@ -304,14 +304,13 @@ describe('ADMIN | Pages | API TOKENS | ListPage', () => {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.c4 {
|
||||
|
@ -7,14 +7,14 @@ import RelativeTime from '../index';
|
||||
const App = (
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<IntlProvider locale="en" messages={{}} textComponent="span">
|
||||
<RelativeTime timestamp={new Date('2015-10-01T07:55:00.000Z')} />
|
||||
<RelativeTime timestamp={new Date('2015-10-01 07:55:00')} />
|
||||
</IntlProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
describe('RelativeTime', () => {
|
||||
beforeEach(() => {
|
||||
jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-01T08:00:00.000Z'));
|
||||
jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-01 08:00:00'));
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
@ -37,7 +37,7 @@ describe('RelativeTime', () => {
|
||||
});
|
||||
|
||||
it('can display the relative time for a future date', () => {
|
||||
jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-01T07:50:00.000Z'));
|
||||
jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-01 07:50:00'));
|
||||
|
||||
render(App);
|
||||
|
||||
@ -45,7 +45,7 @@ describe('RelativeTime', () => {
|
||||
});
|
||||
|
||||
it('can display the relative time for a past date', () => {
|
||||
jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-01T08:00:00.000Z'));
|
||||
jest.spyOn(Date, 'now').mockImplementation(() => new Date('2015-10-01 08:00:00'));
|
||||
|
||||
render(App);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user