Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cqb13 committed Sep 15, 2023
1 parent bca777b commit 81e9538
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 32 deletions.
24 changes: 13 additions & 11 deletions app/account/page.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
"use client";

import { useState, useEffect } from "react";
import { useAuthContext } from "@context/authContext";
import Button from "@/components/general/button";
import { db, auth } from "@lib/firebase";
import Image from "next/image";
import getUserDoc from "@/utils/firebase/db/getUserDoc";
import Input from "@/components/general/input";
import Dropdown from "@/components/general/dropdown";
import updateDisplayName from "@/utils/firebase/db/updateDisplayName";
import updateProfileType from "@/utils/firebase/db/updateProfileType";
import deleteAccount from "@/utils/firebase/account/deleteAccount";
import googleSignOut from "@/utils/firebase/account/googleSignOut";
import { useRouter } from "next/navigation";
import getAverageScore from "@/utils/score/getAverageScore";
import countTotalSplits from "@/utils/score/countTotalSplits";
import getAverageScore from "@/utils/score/getAverageScore";
import getUserDoc from "@/utils/firebase/db/getUserDoc";
import { useAuthContext } from "@context/authContext";
import Dropdown from "@/components/general/dropdown";
import StatBox from "@/components/account/statBox";
import Button from "@/components/general/button";
import Input from "@/components/general/input";
import { useState, useEffect } from "react";
import { useRouter } from "next/navigation";
import { db, auth } from "@lib/firebase";
import Image from "next/image";

export default function History() {
// general
Expand Down Expand Up @@ -101,7 +101,9 @@ export default function History() {
<StatBox name='Total Splits' value={totalSplits} />
</section>
) : null}
{currentWindow == "social" ? <h1>Ill get around to this at some point</h1> : null}
{currentWindow == "social" ? (
<h1>Ill get around to this at some point</h1>
) : null}
{currentWindow == "account" ? (
<section className='shadow-card p-10 border border-gray-300 rounded-md flex gap-2 w-full max-mdLg:flex-col max-mdLg:items-center'>
<Image
Expand Down
12 changes: 6 additions & 6 deletions app/history/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";

import { useEffect, useState } from "react";
import getAllSessions from "@/utils/score/getAllSessions";
import { doc, getDoc } from "firebase/firestore";
import { auth, db } from "@lib/firebase";
import Dropdown from "@/components/general/dropdown";
import { doc, getDoc } from "firebase/firestore";
import Button from "@/components/general/button";
import { useEffect, useState } from "react";
import { auth, db } from "@lib/firebase";

export default function History() {
const [currentGame, setCurrentGame] = useState(1);
Expand Down Expand Up @@ -95,9 +95,9 @@ export default function History() {
<Button title='Next' onClick={switchGame} />
</div>
</section>
<section className='flex gap-2'>
<h2 className="whitespace-nowrap">
{`${location} ${distance} ${distanceUnit} ${bow}`}
<section className='flex gap-2 items-center justify-center'>
<h2 className='whitespace-nowrap'>
{`${location} ${distance}${distanceUnit} ${bow}`}
</h2>
<Button title='Note' onClick={() => {}} />
<Button title='Delete' onClick={() => {}} />
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NavigationEvents } from "@/lib/nav-events";
import { AuthContextProvider } from "@/lib/context/authContext";
import { Inter } from "next/font/google";
import { NavigationEvents } from "@/lib/nav-events";
import NavBar from "@/components/layout/nav";
import { Inter } from "next/font/google";
import type { Metadata } from "next";
import { Suspense } from "react";
import "./globals.css";
Expand Down
8 changes: 4 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use client";

import NotificationPopup from "@/components/general/notificationPopup";
import ScoringChart from "@/components/scoring/scoringChart";
import { useState, useEffect } from "react";
import FinalScoringStats from "@/components/scoring/finalScoringStats";
import SessionOptions from "@/components/scoring/sessionOptions";
import ScoreSetupMenu from "@/components/scoring/scoreSetupMenu";
import FinalScoringStats from "@/components/scoring/finalScoringStats";
import SaveScorePopup from "@/components/scoring/saveScorePopup";
import { useAuthContext } from "@context/authContext";
import ScoringChart from "@/components/scoring/scoringChart";
import SignUpPopup from "@/components/misc/signUpPopup";
import { useAuthContext } from "@context/authContext";
import { useState, useEffect } from "react";

export default function Home() {
const [setup, setSetup] = useState(true);
Expand Down
8 changes: 7 additions & 1 deletion components/account/statBox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export default function StatBox({ name, value }: { name: string; value: number }) {
export default function StatBox({
name,
value
}: {
name: string;
value: number;
}) {
return (
<div className='border-gray-300 rounded-md flex flex-col justify-center gap-2 shadow-card w-48 h-48'>
<h1 className='text-center text-lg'>{name}</h1>
Expand Down
4 changes: 3 additions & 1 deletion components/general/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export default function Dropdown({
<div
className={`${
opened ? " absolute" : "hidden"
} mt-2 w-60 rounded-md shadow-lg bg-lightest ring-1 ring-black ring-opacity-5 z-10 ${customClass ? customClass : ""}`}
} mt-2 w-60 rounded-md shadow-lg bg-lightest ring-1 ring-black ring-opacity-5 z-10 ${
customClass ? customClass : ""
}`}
>
<div
className='py-1'
Expand Down
6 changes: 3 additions & 3 deletions components/layout/nav.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";

import useScroll from "@hooks/useScroll";
import { useRouter, usePathname } from "next/navigation";
import { useAuthContext } from "@/lib/context/authContext";
import googleSignIn from "@/utils/firebase/account/googleSignIn";
import { useAuthContext } from "@/lib/context/authContext";
import { useRouter, usePathname } from "next/navigation";
import useScroll from "@hooks/useScroll";
import { routes } from "@lib/routes";

export default function NavBar() {
Expand Down
2 changes: 1 addition & 1 deletion components/misc/signUpPopup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Button from "@components/general/button";
import googleSignIn from "@/utils/firebase/account/googleSignIn";
import Button from "@components/general/button";

export default function SignUpPopup({
updateSignUpPopup
Expand Down
2 changes: 1 addition & 1 deletion components/scoring/saveScorePopup.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fixDateTimeFormat from "@/utils/fixDateTimeFormat";
import Button from "@components/general/button";
import Input from "@components/general/input";
import fixDateTimeFormat from "@/utils/fixDateTimeFormat";
import { useState, useEffect } from "react";

type SaveScorePopupProps = {
Expand Down
2 changes: 1 addition & 1 deletion components/scoring/scoringChart.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

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

type Props = {
arrowsPerEnd: number;
Expand Down
1 change: 0 additions & 1 deletion components/scoring/sessionOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Button from "@components/general/button";
import { update } from "firebase/database";

export default function SessionOptions({
done,
Expand Down

0 comments on commit 81e9538

Please sign in to comment.