diff --git a/public/api_logo_pwrdBy_strava_stack_white.svg b/public/api_logo_pwrdBy_strava_stack_white.svg
new file mode 100644
index 0000000..ebeba5e
--- /dev/null
+++ b/public/api_logo_pwrdBy_strava_stack_white.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/btn_strava_connectwith_orange.svg b/public/btn_strava_connectwith_orange.svg
new file mode 100644
index 0000000..04f0e81
--- /dev/null
+++ b/public/btn_strava_connectwith_orange.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/src/app/pages/Clubgoals.tsx b/src/app/pages/Clubgoals.tsx
index f2d133d..282cd34 100644
--- a/src/app/pages/Clubgoals.tsx
+++ b/src/app/pages/Clubgoals.tsx
@@ -94,7 +94,7 @@ export const ClubGoals = () => {
const fetchData = async () => {
const result = await fetch(
- `https://l3svp5tprslh63jdazjgg6mdta0ocgkr.lambda-url.eu-central-1.on.aws/`,
+ `https://k66fzrj7leiarkgqtenq2udn3a0oznzh.lambda-url.us-east-2.on.aws/`,
)
setTimestreamData(await result.json())
setExp(
@@ -129,7 +129,11 @@ export const ClubGoals = () => {
}
}
const teams = Object.keys(distanceRecord)
+ console.log(teams)
+ console.log(timestreamData)
+
for (const team of teams) {
+ console.log(team)
distanceRecord[team].activeAthletes =
timestreamData.overall.teamInfo[team].memberCount
}
diff --git a/src/app/pages/Strava.tsx b/src/app/pages/Strava.tsx
index a291526..27ea12c 100644
--- a/src/app/pages/Strava.tsx
+++ b/src/app/pages/Strava.tsx
@@ -62,7 +62,7 @@ export const Strava = () => {
const fetchData = async () => {
const result = await fetch(
- `https://l3svp5tprslh63jdazjgg6mdta0ocgkr.lambda-url.eu-central-1.on.aws/`,
+ `https://k66fzrj7leiarkgqtenq2udn3a0oznzh.lambda-url.us-east-2.on.aws/`,
)
setTimestreamData(await result.json())
setExp(
@@ -90,19 +90,89 @@ export const Strava = () => {
)
}
+ let defaultWeekInfo: TeamInformation = [
+ {
+ teamName: 'Finland',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174164,
+ points: 0,
+ },
+
+ {
+ teamName: 'Poland',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174165,
+ points: 0,
+ },
+
+ {
+ teamName: 'Europe',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174166,
+ points: 0,
+ },
+
+ {
+ teamName: 'APAC',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174167,
+ points: 0,
+ },
+
+ {
+ teamName: 'USA',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174168,
+ points: 0,
+ },
+
+ {
+ teamName: 'Trondheim',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174140,
+ points: 0,
+ },
+
+ {
+ teamName: 'Omega',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174791,
+ points: 0,
+ },
+
+ {
+ teamName: 'Oslo',
+ minutesPerAthlete: 0,
+ distance: 0,
+ teamId: 1174162,
+ points: 0,
+ },
+ ]
let currenWeektTeamInformation = []
for (const weeks of timestreamData.weeks) {
if (weeks.weekNumber === weekNumber) {
currenWeektTeamInformation.push(weeks.teamInformation)
- } else {
- currenWeektTeamInformation = []
- currenWeektTeamInformation.push(weeks.teamInformation)
}
+ continue /*else {
+ console.log('else')
+ //currenWeektTeamInformation = []
+ currenWeektTeamInformation.push(weeks.teamInformation)
+ }*/
+ }
+ if (currenWeektTeamInformation.length === 0) {
+ currenWeektTeamInformation.push(defaultWeekInfo)
}
const weeklyHoursSorted = sortSummaryByHours(currenWeektTeamInformation[0])
const graphData = summaryDataToGraphData(timestreamData.weeks)
-
+ console.log('current', currenWeektTeamInformation)
for (const team of graphData.datasets) {
for (const teamName of currenWeektTeamInformation[0]) {
if (team.label === teamName.teamName) {
@@ -114,8 +184,8 @@ export const Strava = () => {
const tableData = (currenWeektTeamInformation[0] ?? []).sort(
(a: { points: number }, b: { points: number }) => b.points - a.points,
)
- console.log(tableData)
-
+ console.log('tabledata', tableData)
+ console.log(weeklyHoursSorted)
return (
<>
diff --git a/src/app/pages/WeeklySummaries.tsx b/src/app/pages/WeeklySummaries.tsx
index 29b5dbd..1e134bc 100644
--- a/src/app/pages/WeeklySummaries.tsx
+++ b/src/app/pages/WeeklySummaries.tsx
@@ -54,7 +54,7 @@ export const WeeklySummaries = () => {
const fetchData = async () => {
const result = await fetch(
- `https://l3svp5tprslh63jdazjgg6mdta0ocgkr.lambda-url.eu-central-1.on.aws/`,
+ `https://k66fzrj7leiarkgqtenq2udn3a0oznzh.lambda-url.us-east-2.on.aws/`,
)
setTimestreamData(await result.json())
setExp(
diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx
index aa461a3..1f1008b 100644
--- a/src/components/Navbar.tsx
+++ b/src/components/Navbar.tsx
@@ -92,6 +92,13 @@ export const Navbar = () => {
+