diff --git a/client/src/ui/components/DesktopHeader.tsx b/client/src/ui/components/DesktopHeader.tsx
index 1515dc9..dbaf3e7 100644
--- a/client/src/ui/components/DesktopHeader.tsx
+++ b/client/src/ui/components/DesktopHeader.tsx
@@ -11,12 +11,27 @@ import LevelIndicator from "./LevelIndicator";
import SettingsDropDown from "./SettingsDropDown";
import { useNavigate } from "react-router-dom";
import { Controller } from "./Controller";
+import TutorialModal from "./TutorialModal";
-const DesktopHeader = () => {
+interface DesktopHeaderProps {
+ onStartTutorial: () => void;
+}
+
+const DesktopHeader = ({ onStartTutorial }: DesktopHeaderProps) => {
const { account } = useAccountCustom();
const { player } = usePlayer({ playerId: account?.address });
const [isOpen, setIsOpen] = useState(false);
+ const [isTutorialOpen, setIsTutorialOpen] = useState(false);
+
+ const changeTutorialOpen = () => {
+ setIsTutorialOpen(!isTutorialOpen);
+ };
+
+ const handleStartTutorial = () => {
+ changeTutorialOpen();
+ onStartTutorial();
+ };
const onClose = () => {
setIsOpen(false);
@@ -41,6 +56,20 @@ const DesktopHeader = () => {
Collective Chests
+
+
{!!player && (
diff --git a/client/src/ui/components/MobileHeader.tsx b/client/src/ui/components/MobileHeader.tsx
index 5b30399..4d41b60 100644
--- a/client/src/ui/components/MobileHeader.tsx
+++ b/client/src/ui/components/MobileHeader.tsx
@@ -1,4 +1,4 @@
-import { faBars, faCoins, faWallet } from "@fortawesome/free-solid-svg-icons";
+import { faBars, faCoins } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
Drawer,
@@ -28,23 +28,42 @@ import CollectiveTreasureChest from "./TreasureChest";
import { useState } from "react";
import { Surrender } from "../actions/Surrender";
import LevelIndicator from "./LevelIndicator";
-import HeaderNftBalance from "./HeaderNftBalance";
-import { useMediaQuery } from "react-responsive";
import { Controller } from "./Controller";
+import TutorialModal from "./TutorialModal";
-const MobileHeader = () => {
+interface MobileHeaderProps {
+ onStartTutorial: () => void;
+}
+
+const MobileHeader = ({ onStartTutorial }: MobileHeaderProps) => {
const { account } = useAccountCustom();
const { player } = usePlayer({ playerId: account?.address });
const [isOpen, setIsOpen] = useState(false);
+ const [isTutorialOpen, setIsTutorialOpen] = useState(false);
+ const [isDrawerOpen, setIsDrawerOpen] = useState(false);
const onClose = () => {
setIsOpen(false);
};
+ const changeTutorialOpen = () => {
+ setIsTutorialOpen(!isTutorialOpen);
+ setIsDrawerOpen(false); // Close drawer when opening tutorial
+ };
+
+ const handleStartTutorial = () => {
+ changeTutorialOpen();
+ onStartTutorial();
+ };
+
return (
-
+
@@ -53,19 +72,12 @@ const MobileHeader = () => {
zKube
- {/*
*/}
- {/*
*/}
Menu
-
+
+
-
- {/*
*/}
Profile
@@ -90,7 +109,6 @@ const MobileHeader = () => {
- {/*
zKube
*/}
{!!player && account ? (
diff --git a/client/src/ui/components/TutorialModal.tsx b/client/src/ui/components/TutorialModal.tsx
new file mode 100644
index 0000000..c44e063
--- /dev/null
+++ b/client/src/ui/components/TutorialModal.tsx
@@ -0,0 +1,55 @@
+import React from "react";
+import { Dialog, DialogContent, DialogTitle } from "../elements/dialog";
+import { Button } from "../elements/button";
+import ImageAssets from "@/ui/theme/ImageAssets";
+import { useTheme } from "../elements/theme-provider/hooks";
+import { X } from "lucide-react";
+interface TutorialModalProps {
+ isOpen: boolean;
+ onClose: () => void;
+ onStartTutorial: () => void;
+}
+const TutorialModal = ({
+ isOpen,
+ onClose,
+ onStartTutorial,
+}: TutorialModalProps) => {
+ const { themeTemplate } = useTheme();
+ const imgAssets = ImageAssets(themeTemplate);
+ return (
+
+ );
+};
+
+export default TutorialModal;