Skip to content

Commit ff1f832

Browse files
committed
chore: ran prettier
1 parent 29f283e commit ff1f832

File tree

31 files changed

+171
-216
lines changed

31 files changed

+171
-216
lines changed

frontend/public/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
href="https://fonts.googleapis.com/css?family=Poppins"
3030
rel="stylesheet"
3131
/>
32-
3332

3433
<title>Tracer</title>
3534
</head>

frontend/public/site.webmanifest

+19-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
1+
{
2+
"name": "",
3+
"short_name": "",
4+
"icons": [
5+
{
6+
"src": "/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/android-chrome-512x512.png",
12+
"sizes": "512x512",
13+
"type": "image/png"
14+
}
15+
],
16+
"theme_color": "#ffffff",
17+
"background_color": "#ffffff",
18+
"display": "standalone"
19+
}

frontend/src/app/api/file.ts

-16
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ export interface IconNameRes {
1111
message: string;
1212
}
1313

14-
15-
16-
17-
18-
19-
20-
2114
export const uploadIcon = async (
2215
authorizationToken: string,
2316
orgName: string,
@@ -35,10 +28,6 @@ export const uploadIcon = async (
3528
return respnse;
3629
};
3730

38-
39-
40-
41-
4231
export const getIcon = async (authorizationToken: string, orgName: string) => {
4332
const url = BACKEND_URL + '/api/protected/file/getIcon/' + orgName;
4433
const response = await axios.get(
@@ -55,8 +44,6 @@ export const getIcon = async (authorizationToken: string, orgName: string) => {
5544
return response;
5645
};
5746

58-
59-
6047
export const deleteFile = async (
6148
authorizationToken: string,
6249
fileName: string
@@ -71,9 +58,6 @@ export const deleteFile = async (
7158
return respnse;
7259
};
7360

74-
75-
76-
7761
export const getIconName = async (
7862
authorizationToken: string,
7963
orgName: string

frontend/src/app/api/githubData.ts

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

28-
2928
export interface OrgProjectGithubData {
3029
projects: ProjectsGithubData;
3130
}

frontend/src/app/components/search/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import './index.scss';
66

77
const SearchBar = () => {
88
const dispatch = useDispatch();
9-
const [search,setSearch] = useState('')
9+
const [search, setSearch] = useState('');
1010
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
1111
setSearch(e.target.value);
1212
};

frontend/src/app/components/timeRangeSwitch/index.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ interface Props {
1313
const TimeRangeSwitch: React.FC<Props> = ({ weekly, setWeekly }) => {
1414
// const dispatch = useDispatch();
1515
// const isWeekly = useSelector((state: timeRangeModel) => state.isWeekly.value);
16-
useEffect(()=>{
17-
18-
},[weekly, setWeekly])
16+
useEffect(() => {}, [weekly, setWeekly]);
1917
return (
2018
<div className='timerange-cont'>
2119
<button

frontend/src/app/context/user/userState.tsx

+1-1
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 { UserOrgs } from 'app/api/user';
3+
import { UserOrgs } from 'app/api/user';
44

55
interface Props {
66
children: ReactNode;

frontend/src/app/index.scss

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ a:hover {
3838
border: 1px solid white;
3939
}
4040

41-
42-
.pointer{
41+
.pointer {
4342
cursor: pointer;
44-
}
43+
}

frontend/src/app/routes/BasicRoutes.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { Routes, Route } from 'react-router-dom';
32
import ProjectPage from 'features/project';
43
import AddProject from 'features/AddProject';

frontend/src/envConstants.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export const CLIENT_ID =process.env.CLIENT_ID;
1+
export const CLIENT_ID = process.env.CLIENT_ID;
22
export const BACKEND_URL = process.env.BACKEND_URL;
33
export const AVATAR_API = process.env.AVATAR_API;
4-

frontend/src/features/AddProject/index.scss

-1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@
7878
word-wrap: break-word; /* Allows breaking long words */
7979
white-space: normal; /* Ensures normal word wrapping */
8080
margin-top: 5px; /* Adds some spacing above the error message */
81-
8281
}

frontend/src/features/AddProject/index.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ const AddProject = () => {
147147
autoComplete='off'
148148
noValidate
149149
>
150-
<div className='input-title'>Name<span style={{color:'red',paddingLeft:'4px'}}>*</span></div>
150+
<div className='input-title'>
151+
Name<span style={{ color: 'red', paddingLeft: '4px' }}>*</span>
152+
</div>
151153
<input
152154
type='text'
153155
placeholder='Project name'
@@ -158,7 +160,10 @@ const AddProject = () => {
158160
required
159161
/>
160162
{formErrors.name && <p className='form-error'>{formErrors.name}</p>}
161-
<div className='input-title'>Project link<span style={{color:'red',paddingLeft:'4px'}}>*</span></div>
163+
<div className='input-title'>
164+
Project link
165+
<span style={{ color: 'red', paddingLeft: '4px' }}>*</span>
166+
</div>
162167
<input
163168
type='text'
164169
value={form.link}

frontend/src/features/AddProject/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export function isGitHubRepositoryLink(link: string): boolean {
22
const githubRepoPattern =
33
/^https:\/\/github\.com\/[a-zA-Z0-9-]+\/[a-zA-Z0-9-]+$/;
4-
const githubRepoPattern2 =
4+
const githubRepoPattern2 =
55
/^https:\/\/github\.com\/[a-zA-Z0-9-]+\/[a-zA-Z0-9-]+(\.git)?$/;
6-
return (githubRepoPattern.test(link) || githubRepoPattern2.test(link));
6+
return githubRepoPattern.test(link) || githubRepoPattern2.test(link);
77
}
88

99
export function isValidName(input: string): boolean {

frontend/src/features/AddWorkspace/index.scss

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ $breakpoint-tablet: 768px;
126126
}
127127
.add-member-button:disabled {
128128
background-color: grey;
129-
130129
}
131130
}
132131

frontend/src/features/AddWorkspace/index.tsx

+7-11
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,13 @@ const AddWorkspace = () => {
135135
description: desc_error,
136136
});
137137
if (workspace_error || desc_error) {
138-
if (workspace_error)
139-
toast.error('Check workspace field');
140-
if (desc_error) toast.error("Check description field")
141-
}
142-
else {
138+
if (workspace_error) toast.error('Check workspace field');
139+
if (desc_error) toast.error('Check description field');
140+
} else {
143141
if (token) {
144142
const newForm = form;
145143
if (!form.description) {
146-
newForm.description = " "
144+
newForm.description = ' ';
147145
}
148146
const func = async (): Promise<void> => {
149147
const dataRes = await addOrg(token, {
@@ -217,9 +215,7 @@ const AddWorkspace = () => {
217215
noValidate
218216
>
219217
<div className='single-form-element-container'>
220-
<p className='label'>
221-
Add Icon
222-
</p>
218+
<p className='label'>Add Icon</p>
223219
<div className='file-input-container'>
224220
<label htmlFor='icon-file' className='file-label'>
225221
Choose image files here
@@ -297,8 +293,8 @@ const AddWorkspace = () => {
297293
type='button'
298294
disabled={
299295
form.member
300-
? (!users.includes(form.member) &&
301-
form.member == userContext?.username)
296+
? !users.includes(form.member) &&
297+
form.member == userContext?.username
302298
: true
303299
}
304300
>

frontend/src/features/AddWorkspace/types.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { ChangeEvent, FormEvent } from 'react';
22

33
export type _WORKSPACE_FORM_ERROR = {
4-
workspace: string | null;
5-
description: string | null;
6-
image: string | null;
7-
member: string | null;
4+
workspace: string | null;
5+
description: string | null;
6+
image: string | null;
7+
member: string | null;
88
};
99
export type _WORKSPACE_FORM = {
10-
workspace: string;
11-
description: string;
12-
image: File | undefined;
13-
members: string[];
14-
member:string;
15-
};
10+
workspace: string;
11+
description: string;
12+
image: File | undefined;
13+
members: string[];
14+
member: string;
15+
};
1616
export type _WORKSPACE_FORM_CHANGE = (
1717
event: ChangeEvent<HTMLInputElement>,
1818
index?: number

frontend/src/features/EditProject/index.tsx

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
import { ChangeEvent, 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';
55
import toast from 'react-hot-toast';
6-
import {
7-
getProject,
8-
updateProject,
9-
} from 'app/api/project';
10-
import { Projects, getOrgProjects } from 'app/api/organization';
11-
12-
6+
import { getProject, updateProject } from 'app/api/project';
7+
import { Projects, getOrgProjects } from 'app/api/organization';
138

149
const EditProject = () => {
1510
const navigate = useNavigate();
@@ -144,7 +139,7 @@ const EditProject = () => {
144139
</form>
145140
<button className='add-project-btn' onClick={SubmitHandler}>
146141
{/* <img src={tick} alt='' /> */}
147-
Done
142+
Done
148143
</button>
149144
</div>
150145
</div>

frontend/src/features/EditWorkspace/index.tsx

+6-16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
import { getAllUser, getUser } from 'app/api/user';
2-
import { ChangeEvent, useContext, useEffect, useState } from 'react';
2+
import { ChangeEvent, useContext, useEffect, useState } from 'react';
33
import { useNavigate, useParams } from 'react-router-dom';
44
import toast from 'react-hot-toast';
5-
import {
6-
7-
getAllOrgs,
8-
getOrg,
9-
updateOrg,
10-
} from 'app/api/organization';
5+
import { getAllOrgs, getOrg, updateOrg } from 'app/api/organization';
116
import { uploadIcon } from 'app/api/file';
127

138
import './index.scss';
@@ -25,7 +20,6 @@ const EditWorkspace = () => {
2520
const [validName, setValidName] = useState<boolean>(false);
2621
const [uniqueName, setUniqueName] = useState<boolean>(false);
2722

28-
2923
const [users, setUsers] = useState<string[]>([]);
3024
const [orgs, setOrgs] = useState<string[]>([]);
3125

@@ -119,15 +113,11 @@ const EditWorkspace = () => {
119113
description: description,
120114
});
121115

122-
123-
if (selectedFile != null) {
124-
try{
116+
if (selectedFile != null) {
117+
try {
125118
const fileRes = await uploadIcon(token, name, selectedFile);
126-
}catch(e){
127-
128-
}
129-
}
130-
119+
} catch (e) {}
120+
}
131121

132122
navigate('/');
133123
};

frontend/src/features/ProjectAddMember /index.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
2-
import { ChangeEvent, useContext, useEffect, useState } from 'react';
1+
import { ChangeEvent, useContext, useEffect, useState } from 'react';
32
import { useNavigate, useParams } from 'react-router-dom';
43
import { AVATAR_API } from 'envConstants';
54
import { AVATAR_URL } from 'app/constants/api';
65
import toast from 'react-hot-toast';
7-
import {
8-
getOrgMembers,
9-
} from 'app/api/organization';
6+
import { getOrgMembers } from 'app/api/organization';
107

118
import './index.scss';
129
import UserContext from 'app/context/user/userContext';

frontend/src/features/WorkspaceAddMember/index.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import { getAllUser, getUser } from 'app/api/user';
2-
import { ChangeEvent, useContext, useEffect, useState } from 'react';
2+
import { ChangeEvent, useContext, useEffect, useState } from 'react';
33
import { useNavigate, useParams } from 'react-router-dom';
44
import toast from 'react-hot-toast';
5-
import {
6-
addOrgMembers,
7-
getOrgMembers,
8-
} from 'app/api/organization';
9-
5+
import { addOrgMembers, getOrgMembers } from 'app/api/organization';
106

117
import './index.scss';
128
import UserContext from 'app/context/user/userContext';

frontend/src/features/login/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { CLIENT_ID } from '../../envConstants';
32
import { useNavigate, useSearchParams } from 'react-router-dom';
43
import { login } from 'app/api/login';

frontend/src/features/project-members /components/MemberCard.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
21
import {
32
changeProjectMembersStatus,
43
removeProjectMembers,
54
} from 'app/api/project';
65
import UserContext from 'app/context/user/userContext';
7-
import {
8-
ChangeEvent,
9-
useContext,
10-
} from 'react';
6+
import { ChangeEvent, useContext } from 'react';
117
import toast from 'react-hot-toast';
128

139
const MemberCard = ({

frontend/src/features/project/components/contributorCard/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import './index.scss';
32
import contributorPropTypes from 'app/models/contributorPropTypes';
43
import { AVATAR_API } from 'envConstants';

frontend/src/features/workspace-members /components/MemberCard.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { changeOrgMembersStatus, removeOrgMembers } from 'app/api/organization';
22
import UserContext from 'app/context/user/userContext';
3-
import {
4-
ChangeEvent,
5-
useContext,
6-
} from 'react';
3+
import { ChangeEvent, useContext } from 'react';
74
import toast from 'react-hot-toast';
85

96
const MemberCard = ({

0 commit comments

Comments
 (0)