aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-30 00:43:48 +0300
committereug-vs <eug-vs@keemail.me>2020-06-30 00:43:48 +0300
commit5ccb1ec0be71ed4efb22b4942d70d9132415f69e (patch)
tree469128ffe7cd6e35ed1e7738860303c4f3d0200b /src
parent1499c0126d1a7a2377b0267b761479100c636ee9 (diff)
downloadwhich-ui-5ccb1ec0be71ed4efb22b4942d70d9132415f69e.tar.gz
style: fix some eslint errors
Diffstat (limited to 'src')
-rw-r--r--src/components/UserStrip/UserStrip.tsx2
-rw-r--r--src/hooks/useAuth.tsx12
-rw-r--r--src/hooks/useNavigate.tsx3
-rw-r--r--src/pages/FeedPage/FeedPage.tsx2
-rw-r--r--src/pages/FeedPage/PollSubmission.tsx2
-rw-r--r--src/pages/FeedPage/PollSubmissionImage.tsx2
-rw-r--r--src/pages/ProfilePage/ProfilePage.tsx4
7 files changed, 15 insertions, 12 deletions
diff --git a/src/components/UserStrip/UserStrip.tsx b/src/components/UserStrip/UserStrip.tsx
index bbd595e..3ac47b3 100644
--- a/src/components/UserStrip/UserStrip.tsx
+++ b/src/components/UserStrip/UserStrip.tsx
@@ -30,7 +30,7 @@ const useStyles = makeStyles(theme => ({
const UserStrip: React.FC<PropTypes> = ({ user, info }) => {
const classes = useStyles();
- const { navigate } = useNavigate();
+ const { navigate } = useNavigate();
const { username, avatarUrl, verified } = user;
const handleNavigate = () => {
diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx
index 4f76593..00d0c7c 100644
--- a/src/hooks/useAuth.tsx
+++ b/src/hooks/useAuth.tsx
@@ -1,4 +1,6 @@
-import React, { useState, useEffect, useContext, createContext } from 'react';
+import React, {
+ useState, useEffect, useContext, createContext
+} from 'react';
import { User } from 'which-types';
import { post, get } from '../requests';
@@ -60,16 +62,18 @@ const useProvideAuth = () => {
}
}, []);
- return { user, setUser, login, logout, isAuthenticated };
+ return {
+ user, setUser, login, logout, isAuthenticated
+ };
};
export const AuthProvider: React.FC = ({ children }) => {
const auth = useProvideAuth();
const { Provider } = authContext;
- return <Provider value={auth}>{children}</Provider>
+ return <Provider value={auth}>{children}</Provider>;
};
export const useAuth = () => {
return useContext(authContext);
-}
+};
diff --git a/src/hooks/useNavigate.tsx b/src/hooks/useNavigate.tsx
index 0650f55..9513f13 100644
--- a/src/hooks/useNavigate.tsx
+++ b/src/hooks/useNavigate.tsx
@@ -1,5 +1,4 @@
import React, { useState, useContext, createContext } from 'react';
-import { User } from 'which-types';
export interface Page {
prefix: string;
@@ -38,5 +37,5 @@ export const NavigationProvider: React.FC = ({ children }) => {
export const useNavigate = () => {
return useContext(context);
-}
+};
diff --git a/src/pages/FeedPage/FeedPage.tsx b/src/pages/FeedPage/FeedPage.tsx
index 87a56ec..d29103a 100644
--- a/src/pages/FeedPage/FeedPage.tsx
+++ b/src/pages/FeedPage/FeedPage.tsx
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
-import { Poll, User } from 'which-types';
+import { Poll } from 'which-types';
import Feed from '../../components/Feed/Feed';
import { get } from '../../requests';
diff --git a/src/pages/FeedPage/PollSubmission.tsx b/src/pages/FeedPage/PollSubmission.tsx
index 42612f0..18f029c 100644
--- a/src/pages/FeedPage/PollSubmission.tsx
+++ b/src/pages/FeedPage/PollSubmission.tsx
@@ -7,7 +7,7 @@ import {
ClickAwayListener,
Divider
} from '@material-ui/core';
-import { User, Poll, Which } from 'which-types';
+import { Poll, Which } from 'which-types';
import PollSubmissionImage from './PollSubmissionImage';
import UserStrip from '../../components/UserStrip/UserStrip';
import { post } from '../../requests';
diff --git a/src/pages/FeedPage/PollSubmissionImage.tsx b/src/pages/FeedPage/PollSubmissionImage.tsx
index 8d82d45..e2ffad3 100644
--- a/src/pages/FeedPage/PollSubmissionImage.tsx
+++ b/src/pages/FeedPage/PollSubmissionImage.tsx
@@ -41,7 +41,7 @@ const PollSubmissionImage: React.FC<PropTypes> = ({ url, setUrl }) => {
if (!isModalOpen) {
if (url) setUrl('');
else setIsModalOpen(!isModalOpen);
- };
+ }
};
const handleMouseEnter = (): void => {
diff --git a/src/pages/ProfilePage/ProfilePage.tsx b/src/pages/ProfilePage/ProfilePage.tsx
index 808d43a..d354a45 100644
--- a/src/pages/ProfilePage/ProfilePage.tsx
+++ b/src/pages/ProfilePage/ProfilePage.tsx
@@ -4,8 +4,8 @@ import { User, Poll } from 'which-types';
import ProfileInfo from './ProfileInfo';
import Feed from '../../components/Feed/Feed';
import { get } from '../../requests';
-import { useAuth } from '../../hooks/useAuth';
-import { useNavigate } from '../../hooks/useNavigate';
+import { useAuth } from '../../hooks/useAuth';
+import { useNavigate } from '../../hooks/useNavigate';
const ProfilePage: React.FC = () => {