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