From b24acb897b5006d988b6311db5feec3a90192eb4 Mon Sep 17 00:00:00 2001 From: kaushithamsilva Date: Mon, 29 Jan 2024 21:36:33 +0530 Subject: [PATCH] minor edits and finalizing for demo --- .../Analytics/ImpactSummaryCard.module.scss | 4 ++-- .../Profile/ManagerProfile/ManagerProfile.tsx | 2 +- .../Profile/PlayerProfile/PlayerProfile.tsx | 2 ++ .../Profile/PlayerProfile/TeamsActions.tsx | 14 ++++---------- code/client/impax/src/services/mqttClient.ts | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/code/client/impax/src/components/Analytics/ImpactSummaryCard.module.scss b/code/client/impax/src/components/Analytics/ImpactSummaryCard.module.scss index 084a21a3..aebe8f12 100644 --- a/code/client/impax/src/components/Analytics/ImpactSummaryCard.module.scss +++ b/code/client/impax/src/components/Analytics/ImpactSummaryCard.module.scss @@ -27,11 +27,11 @@ } &.longText { - font-size: 3em; + font-size: 2.4em; } &.longlongText { - font-size: 2.4em; + font-size: 2em; line-height: 0.9; letter-spacing: 0.8; } diff --git a/code/client/impax/src/components/Profile/ManagerProfile/ManagerProfile.tsx b/code/client/impax/src/components/Profile/ManagerProfile/ManagerProfile.tsx index 81ed1634..11f3e217 100644 --- a/code/client/impax/src/components/Profile/ManagerProfile/ManagerProfile.tsx +++ b/code/client/impax/src/components/Profile/ManagerProfile/ManagerProfile.tsx @@ -62,7 +62,7 @@ const ManagerProfile = () => { const { register, handleSubmit, - formState: { errors, isSubmitting }, + formState: { isSubmitting }, reset, } = useForm(); diff --git a/code/client/impax/src/components/Profile/PlayerProfile/PlayerProfile.tsx b/code/client/impax/src/components/Profile/PlayerProfile/PlayerProfile.tsx index 3d58efc2..c69ba41b 100644 --- a/code/client/impax/src/components/Profile/PlayerProfile/PlayerProfile.tsx +++ b/code/client/impax/src/components/Profile/PlayerProfile/PlayerProfile.tsx @@ -35,6 +35,7 @@ const PlayerProfile = () => { queryKey: ["data"], }); async function fetchplayerProfileTableData(): Promise { + console.log("Fetching Profile Table..."); // Renew access Token await renewAccessToken(); const response = await fetch(`${BASE_URL}/player/myTeams`, { @@ -100,6 +101,7 @@ const PlayerProfile = () => { )} diff --git a/code/client/impax/src/components/Profile/PlayerProfile/TeamsActions.tsx b/code/client/impax/src/components/Profile/PlayerProfile/TeamsActions.tsx index af10bbc1..6c297fb2 100644 --- a/code/client/impax/src/components/Profile/PlayerProfile/TeamsActions.tsx +++ b/code/client/impax/src/components/Profile/PlayerProfile/TeamsActions.tsx @@ -41,6 +41,7 @@ const TeamActions: React.FC<{ myTeam: MyTeam; handleActions: () => void }> = ({ }; const acceptTeam = async () => { + console.log("Sending request to accept team"); // renew access Token renewAccessToken(); @@ -56,14 +57,9 @@ const TeamActions: React.FC<{ myTeam: MyTeam; handleActions: () => void }> = ({ }, } ); - const responseData = await response.json(); - if (response.ok) { - // for debugging - handleActions(); - console.log("response OK", responseData); - } + // const responseData = await response.json(); + handleActions(); console.log("Hello", response); - return response; }; return ( @@ -77,6 +73,7 @@ const TeamActions: React.FC<{ myTeam: MyTeam; handleActions: () => void }> = ({ Icon={FaCheck} iconSizeEm={1.2} disabled={verification === "verified"} + onClick={() => acceptTeam()} > Accept @@ -85,9 +82,6 @@ const TeamActions: React.FC<{ myTeam: MyTeam; handleActions: () => void }> = ({ description={`You will be added to ${team_name}`} cancel={ { - acceptTeam(); - }} Icon={FaTimes} buttonStyle="primary" iconSizeEm={1} diff --git a/code/client/impax/src/services/mqttClient.ts b/code/client/impax/src/services/mqttClient.ts index 39ac0bd6..d1d2b00c 100644 --- a/code/client/impax/src/services/mqttClient.ts +++ b/code/client/impax/src/services/mqttClient.ts @@ -6,7 +6,7 @@ import { setPlayerMap, setSessionDetails, updatePlayersImpactHistory, - checkBuddiesAvailability, + // checkBuddiesAvailability, flushStates, validateTimestampAndSetPlayerDetails, } from "../states/updateAppStates";