aboutsummaryrefslogtreecommitdiff
path: root/src/ProfileInfo
diff options
context:
space:
mode:
authorilyayudovin <ilyayudovin123@gmail.com>2020-06-12 19:41:54 +0300
committerilyayudovin <ilyayudovin123@gmail.com>2020-06-12 19:41:54 +0300
commit282bd3180b149571cfc5caad98d8b462596157ef (patch)
tree2fa69bcb7e691dae54d1ab1bc52e9f984d4c69fb /src/ProfileInfo
parent8bee1a3fc948f292b23e9024cb89600e08757240 (diff)
downloadwhich-ui-282bd3180b149571cfc5caad98d8b462596157ef.tar.gz
fix: clear eslint errors
Diffstat (limited to 'src/ProfileInfo')
-rw-r--r--src/ProfileInfo/ProfileInfo.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ProfileInfo/ProfileInfo.tsx b/src/ProfileInfo/ProfileInfo.tsx
index 05a2b78..2bba586 100644
--- a/src/ProfileInfo/ProfileInfo.tsx
+++ b/src/ProfileInfo/ProfileInfo.tsx
@@ -1,8 +1,8 @@
-import React, {useEffect, useState} from 'react';
+import React, { useState } from 'react';
import { Avatar } from '@material-ui/core/';
import { makeStyles } from '@material-ui/core/styles';
-import {Poll, User} from "../types";
-import {get} from "../requests";
+import { User } from '../types';
+import { get } from '../requests';
interface PropTypes {
id: string;
@@ -37,10 +37,8 @@ const useStyles = makeStyles({
const ProfileInfo: React.FC<PropTypes> = ({ id }) => {
const [userInfo, setUserInfo] = useState<User>();
- let endpoint: string = '/users/' + id;
-
- get(endpoint).then(response => {
- setUserInfo(response.data)
+ get(`/users/ + ${id}`).then(response => {
+ setUserInfo(response.data);
});
const classes = useStyles();