diff --git a/frontend/src/api/api.ts b/frontend/src/api/api.ts index 2222be99..4cfa7fed 100644 --- a/frontend/src/api/api.ts +++ b/frontend/src/api/api.ts @@ -7,7 +7,7 @@ export class FetchError extends Error { constructor( public resp: Response, - public data?: unknown, + public data?: unknown ) { super(resp.statusText); diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index 8f8a6772..b7841706 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -79,7 +79,7 @@ export const doSignup = async ({ // }; const authenticatedRequest = ( - payload: Parameters>[0], + payload: Parameters>[0] ) => { const token = getStore("AUTH_TOKEN"); if (!token) { @@ -189,7 +189,7 @@ export const getApplicationRatings = (applicationId: number) => export const submitAnswer = ( applicationId: number, questionId: number, - description: string, + description: string ) => authenticatedRequest({ method: "POST", @@ -205,7 +205,7 @@ export const submitAnswer = ( export const createCampaign = ( campaign: NewCampaignInput, roles: RoleInput[], - questions: QuestionInput[], + questions: QuestionInput[] ) => authenticatedRequest({ method: "POST", @@ -230,7 +230,7 @@ export const deleteCampaign = (id: number) => export const setApplicationStatus = ( applicationId: number, - status: ApplicationStatus, + status: ApplicationStatus ) => authenticatedRequest({ method: "PUT", @@ -242,7 +242,7 @@ export const setApplicationStatus = ( export const inviteUserToOrg = ( email: string, organisationId: number, - adminLevel: AdminLevel = "ReadOnly", + adminLevel: AdminLevel = "ReadOnly" ) => authenticatedRequest({ method: "POST", diff --git a/frontend/src/components/AdminSideBar/index.tsx b/frontend/src/components/AdminSideBar/index.tsx index 01b6df55..2d11e5c2 100644 --- a/frontend/src/components/AdminSideBar/index.tsx +++ b/frontend/src/components/AdminSideBar/index.tsx @@ -84,25 +84,25 @@ const AdminSidebar = ({ pushToast( "Organisation Creation Successful", "Organisation successfully created", - "success", + "success" ); } else if (!inputText) { pushToast( "Organisation Creation Error", "Organisation name is required!", - "error", + "error" ); } else if (!uploadedImage.image) { pushToast( "Organisation Creation Error", "Organisation logo image is required!", - "error", + "error" ); } else { pushToast( "Organisation Creation Error", "Organisation unknown error occurred!", - "error", + "error" ); } }; diff --git a/frontend/src/components/ApplicationForm/applicationForm.styled.ts b/frontend/src/components/ApplicationForm/applicationForm.styled.ts index 40e2e9af..c5a05558 100644 --- a/frontend/src/components/ApplicationForm/applicationForm.styled.ts +++ b/frontend/src/components/ApplicationForm/applicationForm.styled.ts @@ -66,7 +66,7 @@ export const Section = styled("div")<{ isHidden?: boolean }>( marginTop: "0px", marginBottom: "50px", display: isHidden ? "none" : "", - }), + }) ); export const SectionHeader = styled("h1")` diff --git a/frontend/src/components/ApplicationForm/index.tsx b/frontend/src/components/ApplicationForm/index.tsx index b6fbaf36..3f57394b 100644 --- a/frontend/src/components/ApplicationForm/index.tsx +++ b/frontend/src/components/ApplicationForm/index.tsx @@ -59,7 +59,7 @@ const ApplicationForm = ({ // (currently gets printed under each rolename and all are overwritten) const handleAnswerInput = ( e: ChangeEvent, - qID: number, + qID: number ) => { setAnswers({ ...answers, ...{ [qID]: e.target.value } }); }; @@ -160,7 +160,7 @@ const ApplicationForm = ({ onChange={(e) => handleAnswerInput(e, q.id)} /> - ), + ) )} ))} diff --git a/frontend/src/components/CampaignCard/Content.tsx b/frontend/src/components/CampaignCard/Content.tsx index aa0b07c3..8a9ff842 100644 --- a/frontend/src/components/CampaignCard/Content.tsx +++ b/frontend/src/components/CampaignCard/Content.tsx @@ -102,13 +102,13 @@ const Content = ({ pushToast( "Update Campaign Cover Image", `Internal Error: ${data}`, - "error", + "error" ); } catch { pushToast( "Update Campaign Cover Image", "Internal Error: Response Invalid", - "error", + "error" ); } @@ -119,7 +119,7 @@ const Content = ({ pushToast( "Update Campaign Cover Image", "Something went wrong on the backend!", - "error", + "error" ); return; @@ -134,7 +134,7 @@ const Content = ({ pushToast( "Update Campaign Cover Image", "Uploaded image succesfully", - "success", + "success" ); }; diff --git a/frontend/src/components/CampaignCard/Popup.tsx b/frontend/src/components/CampaignCard/Popup.tsx index aa43c4d7..896e59aa 100644 --- a/frontend/src/components/CampaignCard/Popup.tsx +++ b/frontend/src/components/CampaignCard/Popup.tsx @@ -27,13 +27,13 @@ type Props = { }; const Popup = ({ appliedFor, positions, open, closeModal }: Props) => { const positionsMap = Object.fromEntries( - positions.map(({ id, ...position }) => [id, position]), + positions.map(({ id, ...position }) => [id, position]) ); const positionStatuses = Object.fromEntries( appliedFor.map(([id, status]) => [ id, { position: positionsMap[id].name, status }, - ]), + ]) ); return ( diff --git a/frontend/src/contexts/MessagePopupContext.ts b/frontend/src/contexts/MessagePopupContext.ts index 9a0e0bb2..8e7c067f 100644 --- a/frontend/src/contexts/MessagePopupContext.ts +++ b/frontend/src/contexts/MessagePopupContext.ts @@ -8,5 +8,5 @@ export type Message = { // eslint-disable-next-line @typescript-eslint/no-empty-function export const MessagePopupContext = createContext( - (_message: Omit) => {}, + (_message: Omit) => {} ); diff --git a/frontend/src/hooks/useFetch.ts b/frontend/src/hooks/useFetch.ts index 616eba35..695aa47f 100644 --- a/frontend/src/hooks/useFetch.ts +++ b/frontend/src/hooks/useFetch.ts @@ -10,7 +10,7 @@ type Controllers = { [url: string]: AbortController }; const getController = ( url: string, controllers: Controllers, - abortBehaviour: AbortBehaviour, + abortBehaviour: AbortBehaviour ) => { let controllerName; switch (abortBehaviour) { @@ -72,7 +72,7 @@ const useFetch = (url: string, options?: Options) => { const controller = getController( url, controllers.current, - abortBehaviour, + abortBehaviour ); let data; @@ -152,7 +152,7 @@ const useFetch = (url: string, options?: Options) => { aborted: false, } as FetchReturn; }, - [], + [] ); useEffect(() => { @@ -168,10 +168,10 @@ const useFetch = (url: string, options?: Options) => { (method: string) => ( url: string, - options?: Omit, "jsonResp" | "abortBehaviour" | "deps">, + options?: Omit, "jsonResp" | "abortBehaviour" | "deps"> ) => doFetch(url, { ...outerOptions, ...options, method } as Options), - [url, options?.body], + [url, options?.body] ); return { diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 8e331bd5..1a44599a 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -9,5 +9,5 @@ globalStyles(); ReactDOM.createRoot(document.getElementById("root")).render( - , + ); diff --git a/frontend/src/pages/admin/AdminContent/index.tsx b/frontend/src/pages/admin/AdminContent/index.tsx index 2cafb0e3..fb64bc29 100644 --- a/frontend/src/pages/admin/AdminContent/index.tsx +++ b/frontend/src/pages/admin/AdminContent/index.tsx @@ -105,14 +105,14 @@ const AdminContent = ({ // FIXME: when array is empty we die??? setOrgList(orgList.filter((_, index) => index !== orgSelected)); setOrgSelected( - orgSelected === orgList.length - 1 ? orgList.length - 2 : orgSelected, + orgSelected === orgList.length - 1 ? orgList.length - 2 : orgSelected ); setShowDeleteDialog(false); }; const handleWindowChange = ( _: MouseEvent, - newWindow: string, + newWindow: string ) => { if (newWindow) { setWindowSelected(newWindow); @@ -124,7 +124,7 @@ const AdminContent = ({ pushToast( "Update Organisation Logo", "No organisation logo given", - "error", + "error" ); return; } @@ -140,13 +140,13 @@ const AdminContent = ({ pushToast( "Update Organisation Logo", `Internal Error: ${data}`, - "error", + "error" ); } catch { pushToast( "Update Organisation Logo", "Internal Error: Response Invalid", - "error", + "error" ); } @@ -157,7 +157,7 @@ const AdminContent = ({ pushToast( "Update Organisation Logo", "Something went wrong on the backend!", - "error", + "error" ); return; @@ -170,7 +170,7 @@ const AdminContent = ({ pushToast( "Update Organisation Logo", "Image uploaded successfully", - "success", + "success" ); }; diff --git a/frontend/src/pages/admin/index.tsx b/frontend/src/pages/admin/index.tsx index c120e61f..421671e7 100644 --- a/frontend/src/pages/admin/index.tsx +++ b/frontend/src/pages/admin/index.tsx @@ -41,11 +41,11 @@ const Admin = () => { orgList, setOrgList, }), - [orgSelected, setOrgSelected, orgList, setOrgList], + [orgSelected, setOrgSelected, orgList, setOrgList] ); const isFormOpenContextValue = useMemo( () => ({ isFormOpen, setIsFormOpen }), - [isFormOpen, setIsFormOpen], + [isFormOpen, setIsFormOpen] ); useEffect(() => { @@ -60,7 +60,7 @@ const Admin = () => { orgName: item.name, campaigns: item.campaigns, members: item.members, - })), + })) ); if (organisations.length > 0) { setOrgSelected(0); @@ -74,7 +74,7 @@ const Admin = () => { title: item.name, startDate: item.starts_at, endDate: item.ends_at, - })), + })) ); setMembers( @@ -82,7 +82,7 @@ const Admin = () => { id: item.id, name: item.display_name, role: item.role, - })), + })) ); } @@ -101,14 +101,14 @@ const Admin = () => { title: item.name, startDate: item.starts_at, endDate: item.ends_at, - })) ?? [], + })) ?? [] ); setMembers( orgList[orgSelected]?.members.map((item) => ({ id: item.id, name: item.display_name, role: item.role, - })) ?? [], + })) ?? [] ); }, [orgSelected, orgList]); diff --git a/frontend/src/pages/admin/review/finalise_candidates/index.tsx b/frontend/src/pages/admin/review/finalise_candidates/index.tsx index 2362c024..a23b6a68 100644 --- a/frontend/src/pages/admin/review/finalise_candidates/index.tsx +++ b/frontend/src/pages/admin/review/finalise_candidates/index.tsx @@ -52,7 +52,7 @@ const FinaliseCandidates = () => { { errorSummary: "Error getting organisation", onSuccess: ({ name }) => setOrganisation(name), - }, + } ); useFetch(`/campaign/${campaignId}`, { @@ -76,11 +76,11 @@ const FinaliseCandidates = () => { .map(({ id, private_status: status }) => [ id, emailTemplates[status] ?? "", - ]), + ]) ); setEmails({ ...emails, ...newEmails }); }, - }, + } ); const tabs = useMemo( @@ -96,7 +96,7 @@ const FinaliseCandidates = () => { ), status: a.private_status, })) ?? [], - [data], + [data] ); const applications = Object.fromEntries(tabs.map(({ id, ...t }) => [id, t])); const [selectedTab, setSelectedTab] = useState(0); @@ -107,7 +107,7 @@ const FinaliseCandidates = () => { role: roles[roleId]?.name, organisation, }), - [roles, organisation], + [roles, organisation] ); const renderEmail = useCallback( @@ -120,13 +120,13 @@ const FinaliseCandidates = () => { Object.keys(emailParams) .map((p) => `{${p}}`) .join("|"), - "g", + "g" ), (p) => - emailParams[p.substring(1, p.length - 1) as keyof typeof emailParams], + emailParams[p.substring(1, p.length - 1) as keyof typeof emailParams] ); }, - [emails, params], + [emails, params] ); const useForAll = useCallback(() => { @@ -134,7 +134,7 @@ const FinaliseCandidates = () => { const newEmails = Object.fromEntries( tabs .filter(({ status }) => status === tab.status) - .map(({ id }) => [id, emails[tab.id]]), + .map(({ id }) => [id, emails[tab.id]]) ); setEmails({ ...emails, @@ -153,7 +153,7 @@ const FinaliseCandidates = () => { applicationId: number, ...args: DropFirst> ) => putApplication(`/${applicationId}/status`, ...args), - [putApplication], + [putApplication] ); })(); @@ -167,7 +167,7 @@ const FinaliseCandidates = () => { }); return !error && !aborted; }, - [putStatus], + [putStatus] ); const sendAll = useCallback(async () => { @@ -178,7 +178,7 @@ const FinaliseCandidates = () => { pushToast( "Update Status", "Updated all application statuses for role", - "success", + "success" ); } }, [sendEmail]); diff --git a/frontend/src/pages/admin/review/marking/ApplicationsList/index.tsx b/frontend/src/pages/admin/review/marking/ApplicationsList/index.tsx index 4e077098..6b2cc46f 100644 --- a/frontend/src/pages/admin/review/marking/ApplicationsList/index.tsx +++ b/frontend/src/pages/admin/review/marking/ApplicationsList/index.tsx @@ -21,7 +21,7 @@ const ApplicationsList = ({ }: Props) => { const handleChange = ( _event: SyntheticEvent, - newValue: number, + newValue: number ) => { setSelectedApplication(newValue); }; diff --git a/frontend/src/pages/admin/review/marking/index.tsx b/frontend/src/pages/admin/review/marking/index.tsx index 4ca76c98..79d4331d 100644 --- a/frontend/src/pages/admin/review/marking/index.tsx +++ b/frontend/src/pages/admin/review/marking/index.tsx @@ -24,7 +24,7 @@ const Marking = () => { const campaignId = Number(useParams().campaignId); const [loading, setLoading] = useState(true); const [applications, setApplications] = useState( - [], + [] ); const roleId = Number(useParams().roleId); const [selectedApplication, setSelectedApplication] = useState(0); @@ -43,13 +43,13 @@ const Marking = () => { applications.map(async (application) => { const { answers } = await getApplicationAnswers(application.id); return answers; - }), + }) ); const ratings = await Promise.all( applications.map(async (application) => { const { ratings } = await getApplicationRatings(application.id); return ratings[ratings.length - 1]; - }), + }) ); setApplications( @@ -61,7 +61,7 @@ const Marking = () => { question: question.title, answer: answers[applicationIdx][questionIdx]?.description, })), - })), + })) ); setLoading(false); }; @@ -75,7 +75,7 @@ const Marking = () => { setApplications(newApplications); void setApplicationRating( applications[selectedApplication].applicationId, - newMark, + newMark ); }; diff --git a/frontend/src/pages/admin/review/rankings/DragDropRankings/index.tsx b/frontend/src/pages/admin/review/rankings/DragDropRankings/index.tsx index 0fffb45f..1abdc1e9 100644 --- a/frontend/src/pages/admin/review/rankings/DragDropRankings/index.tsx +++ b/frontend/src/pages/admin/review/rankings/DragDropRankings/index.tsx @@ -46,8 +46,8 @@ const DragDropRankings = ({ destIdx, 0, rankings.filter( - (candidate: { name: string }) => candidate.name === draggableId, - )[0], + (candidate: { name: string }) => candidate.name === draggableId + )[0] ); setRankings(newRankings); diff --git a/frontend/src/pages/admin/review/rankings/index.tsx b/frontend/src/pages/admin/review/rankings/index.tsx index 07727fde..9a565b77 100644 --- a/frontend/src/pages/admin/review/rankings/index.tsx +++ b/frontend/src/pages/admin/review/rankings/index.tsx @@ -69,17 +69,17 @@ const Rankings = () => { { body: index < passIndex ? "Success" : "Rejected", errorSummary: `Failed to update status for ${ranking.name}`, - }, + } ); return !error && !aborted; - }), + }) ); if (success.every(Boolean)) { pushToast( "Update status", "Updated internal application statuses for role", - "success", + "success" ); } }; @@ -116,7 +116,7 @@ const Rankings = () => { id: application.id, status: application.private_status, ratings: await getRatings(application.id), - })), + })) ); rankings.sort(rankingCmp); setRankings(rankings); @@ -129,7 +129,7 @@ const Rankings = () => { applications.map(async (application) => { const { answers } = await getApplicationAnswers(application.id); return answers; - }), + }) ); setApplications( @@ -144,8 +144,8 @@ const Rankings = () => { answer: answers[applicationIdx][questionIdx]?.description, })), }, - ]), - ), + ]) + ) ); setLoading(false); }; diff --git a/frontend/src/pages/application_page/index.tsx b/frontend/src/pages/application_page/index.tsx index ca2cfd5f..e2b5691b 100644 --- a/frontend/src/pages/application_page/index.tsx +++ b/frontend/src/pages/application_page/index.tsx @@ -73,7 +73,7 @@ const ApplicationPage = () => { } = await getAllCampaigns(); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const campaign = [...pastCampaigns, ...currentCampaigns].find( - (x) => x.campaign.id === campaignId, + (x) => x.campaign.id === campaignId )!; setCampaign(campaign); @@ -99,14 +99,14 @@ const ApplicationPage = () => { setRolesSelected([...rolesSelected, roleId]); } }, - [rolesSelected], + [rolesSelected] ); const setAnswer = useCallback( (question: number, answer: string) => { setAnswers({ ...answers, [question]: answer }); }, - [answers], + [answers] ); if (loading) return ; @@ -123,10 +123,10 @@ const ApplicationPage = () => { }); const roleQuestions: RoleQuestions = Object.fromEntries( - campaign.roles.map((role) => [role.id, []]), + campaign.roles.map((role) => [role.id, []]) ); questions.forEach(({ roles, ...question }) => - roles.forEach((role) => roleQuestions[role].push(question)), + roles.forEach((role) => roleQuestions[role].push(question)) ); const onSubmit = () => { @@ -134,7 +134,7 @@ const ApplicationPage = () => { if (!rolesSelected.length) { // eslint-disable-next-line no-alert alert( - "Submission failed, you must select at least one role to apply for!", + "Submission failed, you must select at least one role to apply for!" ); return; } @@ -148,11 +148,11 @@ const ApplicationPage = () => { .filter((qId) => questions .find((q) => q.id === qId) - ?.roles.has(application.role_id), + ?.roles.has(application.role_id) ) - .map((qId) => submitAnswer(application.id, qId, answers[qId])), + .map((qId) => submitAnswer(application.id, qId, answers[qId])) ); - }), + }) ) .then(() => navigate("/dashboard")) // eslint-disable-next-line no-alert diff --git a/frontend/src/pages/create_campaign/Preview/index.tsx b/frontend/src/pages/create_campaign/Preview/index.tsx index 44c507c2..d6dea6a2 100644 --- a/frontend/src/pages/create_campaign/Preview/index.tsx +++ b/frontend/src/pages/create_campaign/Preview/index.tsx @@ -36,7 +36,7 @@ const ReviewTab = ({ campaign, onSubmit }: Props) => { const [displayForm, setDisplayForm] = useState(false); useEffect(() => { const newAnswers = Object.fromEntries( - questions.map((q) => [q.id, answers[q.id] ?? ""]), + questions.map((q) => [q.id, answers[q.id] ?? ""]) ); setAnswers(newAnswers); }, [questions]); diff --git a/frontend/src/pages/create_campaign/Roles/Question.tsx b/frontend/src/pages/create_campaign/Roles/Question.tsx index 99397d2e..234932d5 100644 --- a/frontend/src/pages/create_campaign/Roles/Question.tsx +++ b/frontend/src/pages/create_campaign/Roles/Question.tsx @@ -14,7 +14,7 @@ type Props = { question: IQuestion; handleQuestionInput: ( e: ChangeEvent, - qId: number, + qId: number ) => void; onQuestionDelete: MouseEventHandler; }; diff --git a/frontend/src/pages/create_campaign/Roles/index.tsx b/frontend/src/pages/create_campaign/Roles/index.tsx index b3e9d1a2..d61e59ca 100644 --- a/frontend/src/pages/create_campaign/Roles/index.tsx +++ b/frontend/src/pages/create_campaign/Roles/index.tsx @@ -38,7 +38,7 @@ const RolesTab = ({ campaign }: Props) => { const open = Boolean(anchorEl); const handleSelectFromExistingClick = ( - event: MouseEvent, + event: MouseEvent ) => { setAnchorEl(event.currentTarget); }; @@ -51,7 +51,7 @@ const RolesTab = ({ campaign }: Props) => { const updatedQuestions = questions.map((q) => q.id === id ? { id: q.id, text: q.text, roles: q.roles.add(roleSelected) } - : q, + : q ); setQuestions(updatedQuestions); handleCloseSelectFromExisting(); @@ -59,7 +59,7 @@ const RolesTab = ({ campaign }: Props) => { // filter for questions pertaining to currently selected role const filteredQuestions = questions.filter( - (q) => !q.roles.has(roleSelected) && q.text !== "", + (q) => !q.roles.has(roleSelected) && q.text !== "" ); const onRoleDelete = (e: MouseEvent) => { @@ -94,33 +94,33 @@ const RolesTab = ({ campaign }: Props) => { id: q.id, text: q.text, roles: new Set([...q.roles].filter((r) => r !== roleSelected)), - }, + } ) - .filter((q) => q.roles.size > 0), + .filter((q) => q.roles.size > 0) ); }; const handleQuestionInput = ( e: ChangeEvent, - targetQID: number, + targetQID: number ) => { setQuestions( questions.map((q) => q.id !== targetQID ? q - : { id: q.id, text: e.currentTarget.value, roles: q.roles }, - ), + : { id: q.id, text: e.currentTarget.value, roles: q.roles } + ) ); }; const addQuestion = () => { if (questions.some((q) => q.text === "")) { console.error( - "Please add text to existing questions before creating a new question!", + "Please add text to existing questions before creating a new question!" ); } else if (roleSelected === -1) { console.error( - "Please create and select one or more roles before adding questions!", + "Please create and select one or more roles before adding questions!" ); } else { setQuestions([ diff --git a/frontend/src/pages/create_campaign/index.tsx b/frontend/src/pages/create_campaign/index.tsx index 505192e0..7f31f666 100644 --- a/frontend/src/pages/create_campaign/index.tsx +++ b/frontend/src/pages/create_campaign/index.tsx @@ -35,7 +35,7 @@ const CreateCampaign = () => { const [campaignName, setCampaignName] = useState(""); const [startDate, setStartDate] = useState(() => new Date()); const [endDate, setEndDate] = useState( - () => new Date(Date.now() + 14 * 3600 * 1000 * 24), + () => new Date(Date.now() + 14 * 3600 * 1000 * 24) ); const [description, setDescription] = useState(""); const [interviewStage, setInterviewStage] = useState(false); @@ -89,7 +89,7 @@ const CreateCampaign = () => { pushToast( "Create Campaign", "Campaign description is required!", - "error", + "error" ); return; } @@ -97,7 +97,7 @@ const CreateCampaign = () => { pushToast( "Create Campaign", "Campaign cover image is required!", - "error", + "error" ); return; } @@ -106,7 +106,7 @@ const CreateCampaign = () => { pushToast( "Create Campaign", "You need to create at least one role", - "error", + "error" ); return; } @@ -132,7 +132,7 @@ const CreateCampaign = () => { pushToast( "Create Campaign", `The question '${question.text}' is not assigned to a role`, - "error", + "error" ); flag = false; } else { @@ -153,7 +153,7 @@ const CreateCampaign = () => { pushToast( "Create Campaign", `The role '${role.title}' does not have any questions`, - "error", + "error" ); } }); @@ -231,7 +231,7 @@ const CreateCampaign = () => { const { id: campaignId } = await createCampaign( campaignSend, rolesSend, - questionsSend, + questionsSend ); await setCampaignCoverImage(campaignId, cover); navigate("/admin"); @@ -245,7 +245,7 @@ const CreateCampaign = () => { pushToast( "Create Campaign", "Internal Error: Response Invalid", - "error", + "error" ); } @@ -256,7 +256,7 @@ const CreateCampaign = () => { pushToast( "Create Campaign", "Something went wrong on the backend!", - "error", + "error" ); } }; diff --git a/frontend/src/pages/dashboard/index.tsx b/frontend/src/pages/dashboard/index.tsx index 488ea30b..724179ed 100644 --- a/frontend/src/pages/dashboard/index.tsx +++ b/frontend/src/pages/dashboard/index.tsx @@ -19,7 +19,7 @@ const Dashboard = () => { const setNavBarTitle = useContext(SetNavBarTitleContext); const [myCampaigns, setMyCampaigns] = useState([]); const [currentCampaigns, setCurrentCampaigns] = useState( - [], + [] ); const [pastCampaigns, setPastCampaigns] = useState([]); const [organisations, setOrganisations] = useState<{ @@ -42,7 +42,7 @@ const Dashboard = () => { removeStore("AUTH_TOKEN"); } else { console.error( - `an error occurred while fetching campaigns (${e.status})`, + `an error occurred while fetching campaigns (${e.status})` ); } navigate("/"); @@ -54,11 +54,11 @@ const Dashboard = () => { const organisations = await Promise.all( [...campaigns.current_campaigns, ...campaigns.past_campaigns].map((c) => - getOrganisation(c.campaign.organisation_id), - ), + getOrganisation(c.campaign.organisation_id) + ) ); setOrganisations( - Object.fromEntries(organisations.map((org) => [org.id, org])), + Object.fromEntries(organisations.map((org) => [org.id, org])) ); const current = campaigns.current_campaigns; diff --git a/frontend/src/pages/landing/components/Campaigns/index.tsx b/frontend/src/pages/landing/components/Campaigns/index.tsx index bbfb02af..3abd3f3d 100644 --- a/frontend/src/pages/landing/components/Campaigns/index.tsx +++ b/frontend/src/pages/landing/components/Campaigns/index.tsx @@ -126,7 +126,7 @@ const Campaigns = forwardRef( ); - }, + } ); export default Campaigns; diff --git a/frontend/src/routes.tsx b/frontend/src/routes.tsx index 179729dc..ecf36117 100644 --- a/frontend/src/routes.tsx +++ b/frontend/src/routes.tsx @@ -7,7 +7,7 @@ const AuthSuccess = lazy(() => import("./pages/auth_success")); const CampaignCreate = lazy(() => import("./pages/create_campaign")); const DashboardPage = lazy(() => import("./pages/dashboard")); const FinaliseCandidates = lazy( - () => import("./pages/admin/review/finalise_candidates"), + () => import("./pages/admin/review/finalise_candidates") ); const LandingPage = lazy(() => import("./pages/landing")); const Marking = lazy(() => import("./pages/admin/review/marking")); diff --git a/frontend/src/utils/index.tsx b/frontend/src/utils/index.tsx index 7f1813c7..d5937723 100644 --- a/frontend/src/utils/index.tsx +++ b/frontend/src/utils/index.tsx @@ -54,7 +54,7 @@ export const removeStore = (key: string) => localStorage.removeItem(key); export const pushToast = ( title: string, description: string, - type?: ToastType, + type?: ToastType ) => { toast.custom((t) => (