no-unused-vars and egegeg for InstructorCourses.js
This commit is contained in:
parent
0fd3627c5a
commit
aebe058ab5
|
@ -1,18 +1,16 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { BrowserRouter as Router, Switch, Route, Link, useParams, useHistory } from 'react-router-dom';
|
import { Link, useParams } from 'react-router-dom';
|
||||||
import ReactQuill from 'react-quill';
|
import ReactQuill from 'react-quill';
|
||||||
import 'react-quill/dist/quill.snow.css';
|
import 'react-quill/dist/quill.snow.css';
|
||||||
import './light.css';
|
import './light.css';
|
||||||
import { Button, Container, Checkbox, Divider, Dropdown, Form, Grid, Header, Icon, Image, Label, Menu, Message, Segment, Table } from 'semantic-ui-react';
|
import { Button, Form, Header, Label } from 'semantic-ui-react';
|
||||||
import { BasicTable, staticUrl, requester } from './utils.js';
|
import { requester } from './utils.js';
|
||||||
|
|
||||||
function InstructorCourseEditor(props) {
|
function InstructorCourseEditor(props) {
|
||||||
const { input, setInput, error } = props;
|
const { input, setInput, error } = props;
|
||||||
|
|
||||||
const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value });
|
const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value });
|
||||||
const handleUpload = (e, v) => setInput({ ...input, [v.name]: e.target.files[0] });
|
|
||||||
const handleChange = (e) => handleValues(e, e.currentTarget);
|
const handleChange = (e) => handleValues(e, e.currentTarget);
|
||||||
const handleCheck = (e, v) => setInput({ ...input, [v.name]: v.checked });
|
|
||||||
const handleQuill = (v, d, s, e) => s === 'user' && setInput({
|
const handleQuill = (v, d, s, e) => s === 'user' && setInput({
|
||||||
...input,
|
...input,
|
||||||
description: v === '<p><br></p>' ? '' : v,
|
description: v === '<p><br></p>' ? '' : v,
|
||||||
|
@ -133,13 +131,8 @@ export function InstructorCourseList(props) {
|
||||||
const [success, setSuccess] = useState(false);
|
const [success, setSuccess] = useState(false);
|
||||||
|
|
||||||
const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value });
|
const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value });
|
||||||
const handleUpload = (e, v) => setInput({ ...input, [v.name]: e.target.files[0] });
|
|
||||||
const handleChange = (e) => handleValues(e, e.currentTarget);
|
const handleChange = (e) => handleValues(e, e.currentTarget);
|
||||||
const handleCheck = (e, v) => setInput({ ...input, [v.name]: v.checked });
|
const handleCheck = (e, v) => setInput({ ...input, [v.name]: v.checked });
|
||||||
const handleQuill = (v, d, s, e) => s === 'user' && setInput({
|
|
||||||
...input,
|
|
||||||
description: v === '<p><br></p>' ? '' : v,
|
|
||||||
});
|
|
||||||
|
|
||||||
const makeProps = (name) => ({
|
const makeProps = (name) => ({
|
||||||
name: name,
|
name: name,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user