From 56a15705cc5f54c388e591973459ab9b96d200fa Mon Sep 17 00:00:00 2001
From: Tana
Date: Wed, 24 May 2023 22:57:40 +0900
Subject: [PATCH 1/2] Bug fies
---
public/icons/cross.png | Bin 0 -> 868 bytes
src/pages/leaderboard.tsx | 88 +++++++++++++++++---------------------
2 files changed, 39 insertions(+), 49 deletions(-)
create mode 100644 public/icons/cross.png
diff --git a/public/icons/cross.png b/public/icons/cross.png
new file mode 100644
index 0000000000000000000000000000000000000000..213e1b1439ccffa2f4a59804d735fb8d3461896a
GIT binary patch
literal 868
zcmV-q1DpJbP)@~0drDELIAGL9O(c600d`2O+f$vv5yP18KoU5zNS+&+
z|0&Rgv_2@hP$UP0Ow+ed2aLagVGSHsVbN~D{${(qy~jJq-0=^`l^_0|Ry@zcfXB^t
z`|}?<&NO{rAAq~_$G^WG1J18AD`Qp%T-{C6*EKrL3{K1{o>gO5`FW;{ZjmnFq^twb
z@PPSrhqMqUW);t%CD)j4kTP&W_Pa4$h`ua1i(;Bb%EKALMH)9F-O7MX???qWo0CmR
z0c|}3l;QlKV;jl~Y6GbThnCb8=o_gPhnChC>=TItht}{^;0uWhht`6vA|FVcIJ5;=
zE3`%8#-XjiUa<|51P*P9h4G9eg+p5-BOZ|?acB=@#uJh>4()}4ctFy?p*>L;OC&8E
z+8Y(IK+?pa5>OdUByAij1q{(ZvcRE|z!XU&D;z2fjFCXH#Gw+w98M%_94Zw8;Xv|$
zLnT8fHAr4?sB{RX1PS;EFE~^Kgp-SO{7F7=s1_(B6KO$oaHu9Ig%3#&hiZdj>XCGD
zs75HK97!LCYK1}ak!)~cuFymRCmvyuhW^EDzLqq0k=93Q@HVfD)aZkv9+IE``KA6v6K6LyQCx<6stBoD^;(rr}UNa8fvt
z7zWh&!b#ymsvMH(6DNfOsbWyCZ=94`q{3n0ZQ!KTAPxBiw1tyWiZnNW(3!M}lah}#
zKY!4xw2c!Je|z3E9GB-0I;DM_luV>0^9S{VlahgSY5t)8a8i~b&CVaxFHXul(u?_n
u{$GbByR;&lRe$2Lo^eu+NN*kg?fnzR1QZ`<+sc*z0000
+type LeaderboardAPIResponse = Array<_LeaderboardAPIResponse>;
const Home: NextPage = () => {
const [leaderboard, setLeaderboard] = useState(
null
- )
+ );
const heightCalculation = ({
x,
y,
z,
}: {
- x: number
- y: number
- z: number
+ x: number;
+ y: number;
+ z: number;
}) => {
return [
(150 * (y / x)).toFixed(0),
(150 * (z / x)).toFixed(0),
- (150 * (y / x) - 25).toFixed(0),
- (150 * (z / x) - 25).toFixed(0),
- ]
- }
-
+ (150 * (y / x) - 5).toFixed(0),
+ (150 * (z / x) - 5).toFixed(0),
+ ];
+ };
const heights = leaderboard
? heightCalculation({
@@ -39,34 +38,25 @@ const Home: NextPage = () => {
y: leaderboard[1]?.score as unknown as number,
z: leaderboard[2]?.score as unknown as number,
})
- : null
-
- const a = heights
- ? { height: Number(heights[0]) }
- : { height: 0 }
- const b = heights
- ? { height: Number(heights[1]) }
- : { height: 0 }
- const c = heights
- ? { height: Number(heights[2]) }
- : { height: 0 }
- const d = heights
- ? { height: Number(heights[3]) }
- : { height: 0 }
+ : null;
+ const a = heights ? { height: Number(heights[0]) } : { height: 0 };
+ const b = heights ? { height: Number(heights[1]) } : { height: 0 };
+ const c = heights ? { height: Number(heights[2]) } : { height: 0 };
+ const d = heights ? { height: Number(heights[3]) } : { height: 0 };
useEffect(() => {
void (async () => {
- const response = await fetch("/api/getLeaderboard")
- console.log(response)
- const data = (await response.json()) as LeaderboardAPIResponse
- console.log(data)
+ const response = await fetch("/api/getLeaderboard");
+ console.log(response);
+ const data = (await response.json()) as LeaderboardAPIResponse;
+ console.log(data);
- setLeaderboard(data)
- })()
- }, [])
+ setLeaderboard(data);
+ })();
+ }, []);
- const dates = "1 May 2023 - 31 May 2023"
+ const dates = "1 May 2023 - 31 May 2023";
return (
<>
@@ -87,10 +77,10 @@ const Home: NextPage = () => {
style={a}
/>
- { leaderboard && leaderboard[1].score}
+ 2
- {leaderboard && leaderboard[1].name}
+ {leaderboard && leaderboard[1].score}
@@ -102,10 +92,10 @@ const Home: NextPage = () => {
/>
- {leaderboard && leaderboard[0].score}
+ 1
- {leaderboard && leaderboard[0].name}
+ {leaderboard && leaderboard[0].score}
@@ -120,10 +110,10 @@ const Home: NextPage = () => {
style={b}
/>
- { leaderboard && leaderboard[2].score}
+ 3
- {leaderboard && leaderboard[2].name}
+ {leaderboard && leaderboard[2].score}
@@ -143,7 +133,7 @@ const Home: NextPage = () => {
Team {leaderboard && leaderboard[3].name}
- { leaderboard && leaderboard[3].score}
+ {leaderboard && leaderboard[3].score}
+1
@@ -160,7 +150,7 @@ const Home: NextPage = () => {
>
- )
-}
+ );
+};
-export default Home
+export default Home;
From 861ca6ff3896ac15bed80505fc7df48ebcca10e7 Mon Sep 17 00:00:00 2001
From: Tana
Date: Wed, 24 May 2023 23:33:57 +0900
Subject: [PATCH 2/2] Bug fixes
---
src/pages/components/QuestLog.tsx | 76 +++++++++++++++++++------------
1 file changed, 46 insertions(+), 30 deletions(-)
diff --git a/src/pages/components/QuestLog.tsx b/src/pages/components/QuestLog.tsx
index 7f33878..44bf625 100644
--- a/src/pages/components/QuestLog.tsx
+++ b/src/pages/components/QuestLog.tsx
@@ -1,34 +1,50 @@
-import Image from 'next/image'
-import {PreferenceBlock} from "~/pages/components/PreferenceBlock";
+import Image from "next/image";
+import { PreferenceBlock } from "~/pages/components/PreferenceBlock";
import React from "react";
-const QuestLog = ({questID}:{questID:string}) => {
- const questName = "Running total of 100 Kilometers"
- const deadLine = "Deadline : 12 Days 10:40 hr [10/Jun/2023 12:00] "
- return (
-
-
-
Team Quest
-
{questName}
-
{deadLine}
-
-
Quest details
-
To contribute to the quest you must submit a photo of the running app’s screen to prove your distance.
-
Enter your distance
-
-
-
-
-
-
+const QuestLog = ({ questID }: { questID: string }) => {
+ const questName = "Running total of 100 Kilometers";
+ const deadLine = "Deadline : 12 Days 10:40 hr [10/Jun/2023 12:00] ";
+ return (
+
+
+
+ Team Quest
+
+
{questName}
+
+ {deadLine}
+
+
- )
-}
+
+ Quest details
+
+
+ To contribute to the quest you must submit a photo of the running
+ app’s screen to prove your distance.
+
+
+ Enter your distance
+
+
+
+
+
+
+
+
+ );
+};
-export {QuestLog}
\ No newline at end of file
+export { QuestLog };