Skip to content

Commit

Permalink
fixed history prop build error
Browse files Browse the repository at this point in the history
  • Loading branch information
cqb13 committed Nov 26, 2023
1 parent c9ef027 commit c297235
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/score/setup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 3 additions & 5 deletions components/scoring/scoringChart.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";

import Button from "@components/general/button";
import isMobile from "@/utils/isMobile";
import { useState, useEffect } from "react";

type Props = {
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -230,8 +228,8 @@ export default function ScoringChart(props: Props) {
</tbody>
</table>
<section
className={`${mobileDevice ? "" : ""} flex gap-2 ${
history ? "hidden" : ""
className={`flex gap-2 ${
props.history ? "hidden" : ""
}`}
>
<Button title='X' onClick={() => setValueOfSelectedBox("X")} />
Expand Down
5 changes: 0 additions & 5 deletions utils/isMobile.ts

This file was deleted.

1 comment on commit c297235

@vercel
Copy link

@vercel vercel bot commented on c297235 Nov 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.