- {matchesCount} / 100 + {matchesCount} / {GOAL_AMOUNT}
); }; diff --git a/src/app/consts.ts b/src/app/consts.ts new file mode 100644 index 0000000..71fdfb7 --- /dev/null +++ b/src/app/consts.ts @@ -0,0 +1 @@ +export const GOAL_AMOUNT = 2; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 3fa21e8..0abd699 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,8 +2,8 @@ import "@/globals.css"; import type { Metadata } from "next"; export const metadata: Metadata = { - title: "Name 100 Norwegians", - description: "How fast can you name 100 Norwegian people?", + title: "Name 2 Norwegians", + description: "How fast can you name 2 Norwegian people?", }; export default function RootLayout({ diff --git a/src/app/page.tsx b/src/app/page.tsx index 4e29b4d..8964cf5 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,5 +1,6 @@ "use client"; +import { GOAL_AMOUNT } from "@/consts"; import { LanguageProvider, useLanguage } from "@/LanguageContext"; import { translations } from "@/translations"; import React, { useMemo, useRef, useState } from "react"; @@ -58,7 +59,7 @@ function Home() { // Stop timer when 100 correct guesses are made React.useEffect(() => { - if (correctMatchesCount === 100) { + if (correctMatchesCount === GOAL_AMOUNT) { stopTimer(); } }, [correctMatchesCount]); @@ -122,7 +123,7 @@ function Home() { setRepeatMessage(""); }} onSubmit={handleSubmit} - disabled={correctMatchesCount === 100} + disabled={correctMatchesCount === GOAL_AMOUNT} />