Skip to content

Commit

Permalink
refactor: remove unused imports
Browse files Browse the repository at this point in the history
This removes import statements that are either unused or commented out.

Refs #397
  • Loading branch information
thewilkybarkid committed Aug 16, 2021
1 parent 5b1c113 commit 0dac056
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 41 deletions.
1 change: 0 additions & 1 deletion src/backend/controllers/group.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import router from 'koa-joi-router';
// import moment from 'moment';
import { getLogger } from '../log.js';
import { getErrorMessages } from '../utils/errors.js';

Expand Down
1 change: 0 additions & 1 deletion src/backend/middleware/mail.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import path from 'path';
import Email from 'email-templates';
import nodemailer from 'nodemailer';
import sendgridTransport from 'nodemailer-sendgrid';
//import { getLogger } from '../log.js';

//const log = getLogger('backend:middleware:mail');

Expand Down
1 change: 0 additions & 1 deletion src/backend/models/entities/Preprint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
ArrayType,
Collection,
Entity,
EntityRepositoryType,
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/Communities.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import SearchBar from './search-bar';
// Material-ui components
import { makeStyles, withStyles } from '@material-ui/core/styles';
import Box from '@material-ui/core/Box';
import Chip from '@material-ui/core/Chip';
import Container from '@material-ui/core/Container';
import Grid from '@material-ui/core/Grid';
import MuiButton from '@material-ui/core/Button';
Expand Down
9 changes: 2 additions & 7 deletions src/frontend/components/add-event.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
// base imports
import React, { useEffect, useState } from 'react';
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import isURL from 'validator/lib/isURL';

// material ui imports
import { makeStyles, withStyles } from '@material-ui/core/styles';
import {
MuiPickersUtilsProvider,
KeyboardDatePicker,
KeyboardTimePicker,
DateTimePicker,
} from '@material-ui/pickers';
import { MuiPickersUtilsProvider, DateTimePicker } from '@material-ui/pickers';
import Checkbox from '@material-ui/core/Checkbox';
import DateFnsUtils from '@date-io/date-fns';
import FormControlLabel from '@material-ui/core/FormControlLabel';
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/components/add-user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// base imports
import React, { useEffect, useState } from 'react';
import React, { useState } from 'react';
import PropTypes from 'prop-types';

// material ui imports
Expand Down
7 changes: 1 addition & 6 deletions src/frontend/components/app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// base imports
import React, { Suspense, useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { DndProvider } from 'react-dnd';
import { HelmetProvider } from 'react-helmet-async';
import { HTML5Backend } from 'react-dnd-html5-backend';
import mobile from 'is-mobile';
import { Switch, Route } from 'react-router-dom';
import { TouchBackend } from 'react-dnd-touch-backend';
//import smoothscroll from 'smoothscroll-polyfill';
import 'url-search-params-polyfill'; /* pollyfill for IE / Edge */
import { IntlProvider } from 'react-intl';

Expand All @@ -17,19 +16,15 @@ import { StoresProvider } from '../contexts/store-context';

// components
import AdminPanel from './admin-panel';
//import BlockPanel from './block-panel';
import Community from './Community';
import Communities from './Communities';
import CommunityPanel from './community-panel';
import Dashboard from './dashboard';
import Event from './Event';
import ExtensionFallback from './extension-fallback';
//import ExtensionSplash from './extension-splash';
import Home from './home';
import Loading from './loading';
import Login from './login';
import Logout from './logout';
import ModeratorRoute from './moderator-route';
import NotFound from './not-found';
import PrivateRoute, { AdminRoute } from './private-route';
import Profile from './profile';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react';
import PropTypes from 'prop-types';

import { default as MuiAvatar } from '@material-ui/core/Avatar';
import { makeStyles } from '@material-ui/core/styles';
import gravatar from 'gravatar';

//const useStyles = makeStyles(() => ({
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/coc-stepper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// base imports
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';

// material ui
import { makeStyles } from '@material-ui/core/styles';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/community-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {

// components
import AddEvent from './add-event';
//import AddTag from './add-tag';
import AddUser from './add-user';
import HeaderBar from './header-bar';
import Loading from './loading';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import UserProvider from '../contexts/user-context';
// Material UI components
import { makeStyles } from '@material-ui/core/styles';
import Box from '@material-ui/core/Box';
import Chip from '@material-ui/core/Chip';
import Container from '@material-ui/core/Container';
import Dialog from '@material-ui/core/Dialog';
import Grid from '@material-ui/core/Grid';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/extension-splash.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Helmet } from 'react-helmet-async';
import HeaderBar from './header-bar';
import Banner from './banner';
import Button from './button';
// import LabelStyle from './label-style';
import { CONTACT_EMAIL_HREF, ORG } from '../constants';
import Org from './org';
import preview from '../assets/images/extension-preview.png';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { makeStyles } from '@material-ui/core/styles';
import Box from '@material-ui/core/Box';
import Card from '@material-ui/core/Card';
import CardActionArea from '@material-ui/core/CardActionArea';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import CardMedia from '@material-ui/core/CardMedia';
import Container from '@material-ui/core/Container';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/moderate.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import CardContent from '@material-ui/core/CardContent';
import CardHeader from '@material-ui/core/CardHeader';
import Grid from '@material-ui/core/Grid';
import IconButton from '@material-ui/core/IconButton';
import Link from '@material-ui/core/Link';
import Modal from '@material-ui/core/Modal';
import MuiButton from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
Expand Down
7 changes: 1 addition & 6 deletions src/frontend/components/moderation-card.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// base imports
import React, { Fragment, useEffect, useState, useRef } from 'react';
import React, { Fragment, useState, useRef } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { format } from 'date-fns';

// utils
import { getId, unprefix } from '../utils/jsonld';
import { getTextAnswers, getActiveReports } from '../utils/stats';

// hooks
import {
Expand All @@ -21,12 +20,8 @@ import Controls from './controls';
import IconButton from './icon-button';
import Modal from './modal';
import PreprintPreview from './preprint-preview';
import RoleBadge from './role-badge';
import Value from './value';

// materialUI components
import CircularProgress from '@material-ui/core/CircularProgress';

// icons
import { MdExpandLess, MdExpandMore, MdLock } from 'react-icons/md';

Expand Down
2 changes: 1 addition & 1 deletion src/frontend/components/moderator-route.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useContext, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Route, Redirect } from 'react-router-dom';
import { Route } from 'react-router-dom';
import UserProvider from '../contexts/user-context';
import NotFound from './not-found';

Expand Down
2 changes: 0 additions & 2 deletions src/frontend/components/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import AccordionSummary from '@material-ui/core/AccordionSummary';
import AccordionDetails from '@material-ui/core/AccordionDetails';
import Avatar from '@material-ui/core/Avatar';
import Box from '@material-ui/core/Box';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import Chip from '@material-ui/core/Chip';
import Container from '@material-ui/core/Container';
import Dialog from '@material-ui/core/Dialog';
Expand Down
2 changes: 0 additions & 2 deletions src/frontend/components/review.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// base imports
import React from 'react';
import { Helmet } from 'react-helmet-async';
// import { unprefix } from '../utils/jsonld';
import { ORG } from '../constants';

// module imports
// import { EditorWrapper } from './editor';
import CollabEditor from './collab-editor';

export default function Review() {
Expand Down
2 changes: 0 additions & 2 deletions src/frontend/components/reviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import React, { useContext, useState } from 'react';
import { useHistory, useLocation } from 'react-router-dom';
import { Helmet } from 'react-helmet-async';
import PropTypes from 'prop-types';
import Tooltip from '@reach/tooltip';

// Material UI imports
import { makeStyles } from '@material-ui/core/styles';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/role-badge-old.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import MuiAvatar from '@material-ui/core/Avatar';
import Popover from '@material-ui/core/Popover';

// components
//import Avatar from './avatar';
import NoticeBadge from './notice-badge';
import XLink from './xlink';

Expand Down
1 change: 0 additions & 1 deletion src/frontend/components/role-badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import Tooltip from '@reach/tooltip';
import { useHistory } from 'react-router-dom';

// material UI
import { makeStyles, withStyles } from '@material-ui/core/styles';
Expand Down
1 change: 0 additions & 1 deletion src/frontend/utils/stats.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { QUESTIONS } from '../constants';
import { arrayify } from './jsonld';
import { checkIfIsModerated } from './actions';
import { useGetPersonas } from '../hooks/api-hooks.tsx';

function isYes(textOrAnswer) {
const text =
Expand Down

0 comments on commit 0dac056

Please sign in to comment.