From c297235a3bcb3a2cc55a37ee2de2bc81a87190eb Mon Sep 17 00:00:00 2001 From: cqb13 Date: Sat, 25 Nov 2023 19:29:12 -0500 Subject: [PATCH] fixed history prop build error --- app/score/setup/page.tsx | 2 +- components/scoring/scoringChart.tsx | 8 +++----- utils/isMobile.ts | 5 ----- 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 utils/isMobile.ts diff --git a/app/score/setup/page.tsx b/app/score/setup/page.tsx index 558dfc1..634d40a 100644 --- a/app/score/setup/page.tsx +++ b/app/score/setup/page.tsx @@ -10,7 +10,7 @@ import Slider from "@/components/general/slider"; import { useRouter } from "next/navigation"; import { useState, useEffect } from "react"; -export default function Score() { +export default function Setup() { const scoreContext = useScoreContext() as any; const { user } = useAuthContext() as any; const router = useRouter(); diff --git a/components/scoring/scoringChart.tsx b/components/scoring/scoringChart.tsx index 4cb2e73..6073e5f 100644 --- a/components/scoring/scoringChart.tsx +++ b/components/scoring/scoringChart.tsx @@ -1,7 +1,6 @@ "use client"; import Button from "@components/general/button"; -import isMobile from "@/utils/isMobile"; import { useState, useEffect } from "react"; type Props = { @@ -17,7 +16,6 @@ type Props = { export default function ScoringChart(props: Props) { const [currentSplit, setCurrentSplit] = useState(0); const [data, setData] = useState({} as any); - const mobileDevice = isMobile(); useEffect(() => { if (!props.updateData) return; @@ -112,7 +110,7 @@ export default function ScoringChart(props: Props) { }; useEffect(() => { - if (history && props.score) { + if (props.history && props.score) { setData(props.score); } else { if (!props.splits || !props.ends || !props.arrowsPerEnd) return; @@ -230,8 +228,8 @@ export default function ScoringChart(props: Props) {