mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
Remove component import from functional JSX
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
import React, { Component, useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import React, { Component, useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ const CreateGroup = (props) => {
|
|||||||
id="group-name"
|
id="group-name"
|
||||||
placeholder="group name..."
|
placeholder="group name..."
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
console.log(e.target.value);
|
||||||
setGroupName(e.target.value);
|
setGroupName(e.target.value);
|
||||||
}}
|
}}
|
||||||
></input>
|
></input>
|
||||||
@@ -39,7 +40,6 @@ const CreateGroup = (props) => {
|
|||||||
id="submit"
|
id="submit"
|
||||||
className="btn btn-primary"
|
className="btn btn-primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
let groupName = groupName;
|
|
||||||
createGroup(groupName)
|
createGroup(groupName)
|
||||||
.then(refreshGroupsData())
|
.then(refreshGroupsData())
|
||||||
.then(history.push("/groups"))
|
.then(history.push("/groups"))
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import React, { Component, useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import React, { Component, useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import Multiselect from "../Multiselect/Multiselect";
|
import Multiselect from "../Multiselect/Multiselect";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
@@ -119,6 +119,7 @@ GroupEdit.propTypes = {
|
|||||||
addToGroup: PropTypes.func,
|
addToGroup: PropTypes.func,
|
||||||
removeFromGroup: PropTypes.func,
|
removeFromGroup: PropTypes.func,
|
||||||
deleteGroup: PropTypes.func,
|
deleteGroup: PropTypes.func,
|
||||||
|
refreshGroupsData: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default GroupEdit;
|
export default GroupEdit;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import React, { Component } from "react";
|
import React from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ const Groups = (props) => {
|
|||||||
groups_data,
|
groups_data,
|
||||||
refreshGroupsData,
|
refreshGroupsData,
|
||||||
refreshUserData,
|
refreshUserData,
|
||||||
history
|
history,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
if (!groups_data || !user_data) {
|
if (!groups_data || !user_data) {
|
||||||
@@ -77,6 +77,9 @@ Groups.propTypes = {
|
|||||||
groups_data: PropTypes.array,
|
groups_data: PropTypes.array,
|
||||||
refreshUserData: PropTypes.func,
|
refreshUserData: PropTypes.func,
|
||||||
refreshGroupsData: PropTypes.func,
|
refreshGroupsData: PropTypes.func,
|
||||||
|
history: PropTypes.shape({
|
||||||
|
push: PropTypes.func,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Groups;
|
export default Groups;
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user