Remove component import from functional JSX

This commit is contained in:
Nathan Barber
2021-04-07 12:11:04 -04:00
parent 6a1a4de329
commit 752d6305fd
7 changed files with 15 additions and 11 deletions

View File

@@ -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"))