diff --git a/src/app/components/HowToPlay.tsx b/src/app/components/HowToPlay.tsx index 143eddb..2d51718 100644 --- a/src/app/components/HowToPlay.tsx +++ b/src/app/components/HowToPlay.tsx @@ -1,5 +1,6 @@ import { useLanguage } from "@/LanguageContext"; import { translations } from "@/translations"; +import { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from "@headlessui/react"; import React from "react"; interface HowToPlayProps { @@ -10,25 +11,27 @@ interface HowToPlayProps { const HowToPlay: React.FC = ({ open, onClose }) => { const { language } = useLanguage(); const t = translations[language]; - if (!open) return null; return ( -
-
e.stopPropagation()}> - -

{t.howToPlayTitle}

-
    -
  • {t.howToPlay1}
  • -
  • {t.howToPlay2}
  • -
  • {t.howToPlay3}
  • -
+ + +
+ + + {t.howToPlayTitle} +
    +
  • {t.howToPlay1}
  • +
  • {t.howToPlay2}
  • +
  • {t.howToPlay3}
  • +
+
-
+ ); }; diff --git a/src/app/translations.ts b/src/app/translations.ts index 58e8e63..a77c748 100644 --- a/src/app/translations.ts +++ b/src/app/translations.ts @@ -25,6 +25,7 @@ export const translations = { goalReached: "You named {count} UiO Gamers in {time}!", guessFailed: "Something went wrong. Please try again.", sessionExpired: "Your session has expired. Reload the page to log in again.", + close: "Close", }, no: { submittedAnswers: "Dine svar", @@ -51,5 +52,6 @@ export const translations = { goalReached: "Du navnga {count} UiO-Gamere på {time}!", guessFailed: "Noe gikk galt. Prøv igjen.", sessionExpired: "Økten din har utløpt. Last inn siden på nytt for å logge inn igjen.", + close: "Lukk", }, };