Skip to content

Commit 3bdd183

Browse files
committed
rfac: removed useless imports
1 parent 8a2dc5e commit 3bdd183

File tree

23 files changed

+48
-72
lines changed

23 files changed

+48
-72
lines changed

src/app/api/file.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ export interface FileUpload {
1010
export interface IconNameRes {
1111
message: string;
1212
}
13+
14+
15+
16+
17+
18+
19+
20+
1321
export const uploadIcon = async (
1422
authorizationToken: string,
1523
orgName: string,
@@ -27,6 +35,10 @@ export const uploadIcon = async (
2735
return respnse;
2836
};
2937

38+
39+
40+
41+
3042
export const getIcon = async (authorizationToken: string, orgName: string) => {
3143
const url = BACKEND_URL + '/api/protected/file/getIcon/' + orgName;
3244
const response = await axios.get(
@@ -43,6 +55,8 @@ export const getIcon = async (authorizationToken: string, orgName: string) => {
4355
return response;
4456
};
4557

58+
59+
4660
export const deleteFile = async (
4761
authorizationToken: string,
4862
fileName: string
@@ -57,6 +71,9 @@ export const deleteFile = async (
5771
return respnse;
5872
};
5973

74+
75+
76+
6077
export const getIconName = async (
6178
authorizationToken: string,
6279
orgName: string

src/app/api/githubData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface ProjectStats {
2525
contributors: Contributors;
2626
}
2727

28-
// Contributors==project issues commits pull
28+
2929
export interface OrgProjectGithubData {
3030
projects: ProjectsGithubData;
3131
}

src/app/context/user/userContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UserOrgDetails, UserOrgs } from 'app/api/user';
1+
import { UserOrgs } from 'app/api/user';
22
import { createContext } from 'react';
33

44
export interface UserContextType {

src/app/context/user/userState.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FC, ReactNode, useState } from 'react';
22
import UserContext from './userContext';
3-
import { UserOrgDetails, UserOrgs } from 'app/api/user';
3+
import { UserOrgs } from 'app/api/user';
44

55
interface Props {
66
children: ReactNode;

src/app/routes/BasicRoutes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
22
import { Routes, Route } from 'react-router-dom';
33
import ProjectPage from 'features/project';
44
import AddProject from 'features/AddProject';

src/features/AddProject/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ import React, { ChangeEvent, useContext, useEffect, useState } from 'react';
22
import './index.scss';
33
import tick from '../../app/assets/images/tick.png';
44
import { useNavigate, useParams } from 'react-router-dom';
5-
import { getUser } from 'app/api/user';
65
import toast from 'react-hot-toast';
7-
import { useQuery } from 'react-query';
8-
import axios from 'axios';
96
import { addProject } from 'app/api/project';
10-
import UserContext from 'app/context/user/userContext';
11-
import { OrgProjects, Projects, getOrgProjects } from 'app/api/organization';
7+
import { Projects, getOrgProjects } from 'app/api/organization';
8+
9+
1210
const AddProject = () => {
1311
const navigate = useNavigate();
14-
const userContext = useContext(UserContext);
1512
const token = localStorage.getItem('token');
1613
const { spaceName } = useParams();
1714
const [name, setName] = useState<string | null>(null);

src/features/AddWorkspace/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { getAllUser, getUser } from 'app/api/user';
2-
import React, { ChangeEvent, useContext, useEffect, useState } from 'react';
1+
import { getAllUser } from 'app/api/user';
2+
import { ChangeEvent, useContext, useEffect, useState } from 'react';
33
import { useNavigate } from 'react-router-dom';
4-
import { useQuery } from 'react-query';
54
import toast from 'react-hot-toast';
65
import { addOrg, addOrgMembers, getAllOrgs } from 'app/api/organization';
76
import { uploadIcon } from 'app/api/file';

src/features/EditProject/index.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
1-
import React, { ChangeEvent, useContext, useEffect, useState } from 'react';
1+
import { ChangeEvent, useEffect, useState } from 'react';
22
import './index.scss';
33
import tick from '../../app/assets/images/tick.png';
44
import { useNavigate, useParams } from 'react-router-dom';
5-
import { getUser } from 'app/api/user';
65
import toast from 'react-hot-toast';
7-
import { useQuery } from 'react-query';
8-
import axios from 'axios';
96
import {
10-
GetProject,
11-
addProject,
127
getProject,
138
updateProject,
149
} from 'app/api/project';
1510
import UserContext from 'app/context/user/userContext';
16-
import { OrgProjects, Projects, getOrgProjects } from 'app/api/organization';
11+
import { Projects, getOrgProjects } from 'app/api/organization';
12+
13+
14+
1715
const EditProject = () => {
1816
const navigate = useNavigate();
19-
const userContext = useContext(UserContext);
2017
const token = localStorage.getItem('token');
2118
const [name, setName] = useState<string | null>(null);
2219
const [description, setDescription] = useState<string | null>(null);

src/features/EditWorkspace/index.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { getAllUser, getUser } from 'app/api/user';
2-
import React, { ChangeEvent, useContext, useEffect, useState } from 'react';
2+
import { ChangeEvent, useContext, useEffect, useState } from 'react';
33
import { useNavigate, useParams } from 'react-router-dom';
4-
import { useQuery } from 'react-query';
54
import toast from 'react-hot-toast';
65
import {
7-
addOrg,
8-
addOrgMembers,
6+
97
getAllOrgs,
108
getOrg,
119
updateOrg,
@@ -18,7 +16,6 @@ import UserContext from 'app/context/user/userContext';
1816
const EditWorkspace = () => {
1917
const navigate = useNavigate();
2018
const token = localStorage.getItem('token');
21-
const userContext = useContext(UserContext);
2219
const { spaceName } = useParams();
2320

2421
const [selectedFile, setSelectedFile] = useState<File | null>(null);
@@ -27,8 +24,7 @@ const EditWorkspace = () => {
2724
const [validDescription, setValidDescription] = useState<boolean>(true);
2825
const [validName, setValidName] = useState<boolean>(false);
2926
const [uniqueName, setUniqueName] = useState<boolean>(false);
30-
const [members, setMembers] = useState<string[]>([]);
31-
const [memberName, setMemberName] = useState<string | null>(null);
27+
3228

3329
const [users, setUsers] = useState<string[]>([]);
3430
const [orgs, setOrgs] = useState<string[]>([]);

src/features/ProjectAddMember /index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import { getAllUser, getUser } from 'app/api/user';
2-
import React, { ChangeEvent, useContext, useEffect, useState } from 'react';
1+
2+
import { ChangeEvent, useContext, useEffect, useState } from 'react';
33
import { useNavigate, useParams } from 'react-router-dom';
44
import { AVATAR_API } from 'envConstants';
55
import { AVATAR_URL } from 'app/constants/api';
66
import toast from 'react-hot-toast';
77
import {
8-
addOrg,
9-
addOrgMembers,
10-
getAllOrgs,
118
getOrgMembers,
129
} from 'app/api/organization';
1310

0 commit comments

Comments
 (0)