1
0
Fork 0
forked from gitea/nas

Merge commit 'dfa5889fc0' into kb_migration

This commit is contained in:
KMY 2023-05-23 22:17:10 +09:00
commit 4a19077534
285 changed files with 938 additions and 822 deletions

View file

@ -1,4 +1,4 @@
import React from 'react';
import { Component, PureComponent, cloneElement, Children } from 'react';
import PropTypes from 'prop-types';
import { Switch, Route } from 'react-router-dom';
import StackTrace from 'stacktrace-js';
@ -7,14 +7,14 @@ import BundleColumnError from '../components/bundle_column_error';
import BundleContainer from '../containers/bundle_container';
// Small wrapper to pass multiColumn to the route components
export class WrappedSwitch extends React.PureComponent {
export class WrappedSwitch extends PureComponent {
render () {
const { multiColumn, children } = this.props;
return (
<Switch>
{React.Children.map(children, child => React.cloneElement(child, { multiColumn }))}
{Children.map(children, child => cloneElement(child, { multiColumn }))}
</Switch>
);
}
@ -29,7 +29,7 @@ WrappedSwitch.propTypes = {
// Small Wrapper to extract the params from the route and pass
// them to the rendered component, together with the content to
// be rendered inside (the children)
export class WrappedRoute extends React.Component {
export class WrappedRoute extends Component {
static propTypes = {
component: PropTypes.func.isRequired,

View file

@ -1,6 +1,6 @@
// Like react-motion's Motion, but reduces all animations to cross-fades
// for the benefit of users with motion sickness.
import React from 'react';
import { Component } from 'react';
import Motion from 'react-motion/lib/Motion';
import PropTypes from 'prop-types';
@ -11,7 +11,7 @@ const extractValue = (value) => {
return (typeof value === 'object' && value && 'val' in value) ? value.val : value;
};
class ReducedMotion extends React.Component {
class ReducedMotion extends Component {
static propTypes = {
defaultStyle: PropTypes.object,