From 465c8c35e087ff6245f45eace3a67c215660bd2d Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Mon, 13 Jun 2022 16:41:10 +0300 Subject: [PATCH] chore: remove unused imports --- src/Components/Inputs/TextEditor/SaveModule.tsx | 6 +++--- src/Components/Navbar/NavDesktop.tsx | 5 ++--- src/Components/Navbar/NavMobile.tsx | 2 +- .../Hackathons/pages/HackathonsPage/HackathonsPage.tsx | 4 ++-- .../Components/ContentEditor/ContentEditor.tsx | 5 +---- .../CreatePostPage/Components/ContentEditor/Toolbar.tsx | 3 +-- src/features/Posts/pages/FeedPage/FeedPage.tsx | 3 +-- src/features/Posts/pages/FeedPage/SortBy/SortBy.tsx | 5 +---- 8 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/Components/Inputs/TextEditor/SaveModule.tsx b/src/Components/Inputs/TextEditor/SaveModule.tsx index af03581..6ba3f11 100644 --- a/src/Components/Inputs/TextEditor/SaveModule.tsx +++ b/src/Components/Inputs/TextEditor/SaveModule.tsx @@ -1,4 +1,4 @@ -import { useHelpers, useEvent, useRemirrorContext } from '@remirror/react'; +import { useHelpers, useRemirrorContext } from '@remirror/react'; import { Control, useController } from 'react-hook-form'; import { useDebouncedCallback } from '@react-hookz/web'; @@ -9,12 +9,12 @@ interface Props { export default function SaveModule(props: Props) { - const { field: { onChange, onBlur } } = useController({ + const { field: { onChange } } = useController({ control: props.control, name: props.name ?? 'content' }) - const { getMarkdown, getHTML } = useHelpers(); + const { getMarkdown } = useHelpers(); const changeCallback = useDebouncedCallback(ctx => { const { state } = ctx; diff --git a/src/Components/Navbar/NavDesktop.tsx b/src/Components/Navbar/NavDesktop.tsx index 819907a..3e64fb7 100644 --- a/src/Components/Navbar/NavDesktop.tsx +++ b/src/Components/Navbar/NavDesktop.tsx @@ -14,7 +14,7 @@ import { ControlledMenu, } from '@szhsin/react-menu'; import '@szhsin/react-menu/dist/index.css'; -import { FiAward, FiChevronDown, FiFeather, FiLogIn, FiMic } from "react-icons/fi"; +import { FiChevronDown, FiLogIn } from "react-icons/fi"; import Avatar from "src/features/Profiles/Components/Avatar/Avatar"; @@ -25,8 +25,7 @@ export default function NavDesktop() { - const { isWalletConnected, curUser } = useAppSelector((state) => ({ - isWalletConnected: state.wallet.isConnected, + const { curUser } = useAppSelector((state) => ({ curUser: state.user.me, })); diff --git a/src/Components/Navbar/NavMobile.tsx b/src/Components/Navbar/NavMobile.tsx index 1bbf402..b44dc8f 100644 --- a/src/Components/Navbar/NavMobile.tsx +++ b/src/Components/Navbar/NavMobile.tsx @@ -7,7 +7,7 @@ import ASSETS from "src/assets"; import Search from "./Search/Search"; import IconButton from "../IconButton/IconButton"; import { useAppSelector } from "src/utils/hooks"; -import { FiAward, FiFeather, FiMenu, FiMic, } from "react-icons/fi"; +import { FiMenu, } from "react-icons/fi"; import { Link, useNavigate } from "react-router-dom"; import { useToggle } from "@react-hookz/web"; import styles from './styles.module.css' diff --git a/src/features/Hackathons/pages/HackathonsPage/HackathonsPage.tsx b/src/features/Hackathons/pages/HackathonsPage/HackathonsPage.tsx index fb7ba5a..e8d1d25 100644 --- a/src/features/Hackathons/pages/HackathonsPage/HackathonsPage.tsx +++ b/src/features/Hackathons/pages/HackathonsPage/HackathonsPage.tsx @@ -1,8 +1,8 @@ -import { useReducer, useState } from 'react' +import { useState } from 'react' import Button from 'src/Components/Button/Button' import { useGetHackathonsQuery } from 'src/graphql' -import { useAppSelector, useInfiniteQuery } from 'src/utils/hooks' +import { useAppSelector } from 'src/utils/hooks' import HackathonsList from '../../Components/HackathonsList/HackathonsList' import SortByFilter from '../../Components/SortByFilter/SortByFilter' import styles from './styles.module.scss' diff --git a/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/ContentEditor.tsx b/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/ContentEditor.tsx index a9830c7..cccbe5d 100644 --- a/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/ContentEditor.tsx +++ b/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/ContentEditor.tsx @@ -20,14 +20,11 @@ import { OrderedListExtension, PlaceholderExtension, IframeExtension, - StrikeExtension, - TableExtension, - TrailingNodeExtension, UnderlineExtension, } from 'remirror/extensions'; import { ExtensionPriority, InvalidContentHandler } from 'remirror'; import { EditorComponent, Remirror, useRemirror } from '@remirror/react'; -import { useCallback, useEffect, useMemo } from 'react'; +import { useCallback } from 'react'; import TextEditorComponents from 'src/Components/Inputs/TextEditor'; import Toolbar from './Toolbar'; diff --git a/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/Toolbar.tsx b/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/Toolbar.tsx index 997322f..ef73d3d 100644 --- a/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/Toolbar.tsx +++ b/src/features/Posts/pages/CreatePostPage/Components/ContentEditor/Toolbar.tsx @@ -1,8 +1,7 @@ import TextEditorComponents from 'src/Components/Inputs/TextEditor'; -interface Props { -} + export default function Toolbar() { diff --git a/src/features/Posts/pages/FeedPage/FeedPage.tsx b/src/features/Posts/pages/FeedPage/FeedPage.tsx index 3a6519a..f8d5a6d 100644 --- a/src/features/Posts/pages/FeedPage/FeedPage.tsx +++ b/src/features/Posts/pages/FeedPage/FeedPage.tsx @@ -1,7 +1,6 @@ import { useUpdateEffect } from '@react-hookz/web' -import { useReducer, useState } from 'react' -import { Nullable } from 'remirror' +import { useState } from 'react' import { useFeedQuery } from 'src/graphql' import { useAppSelector, useInfiniteQuery } from 'src/utils/hooks' import PostsList from '../../Components/PostsList/PostsList' diff --git a/src/features/Posts/pages/FeedPage/SortBy/SortBy.tsx b/src/features/Posts/pages/FeedPage/SortBy/SortBy.tsx index e0169b1..aefa265 100644 --- a/src/features/Posts/pages/FeedPage/SortBy/SortBy.tsx +++ b/src/features/Posts/pages/FeedPage/SortBy/SortBy.tsx @@ -1,8 +1,5 @@ -import { useMediaQuery } from 'src/utils/hooks'; -import React, { useState } from 'react' +import { useState } from 'react' import { Nullable } from 'remirror'; -import AutoComplete from 'src/Components/Inputs/Autocomplete/Autocomplete'; -import { MEDIA_QUERIES } from 'src/utils/theme'; const filters = [ {