Skip to content

Commit

Permalink
create burner in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed Sep 19, 2023
1 parent 3555ac0 commit fe76071
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion web/src/components/Tutorial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Button from "@/components/Button";
import { useState, useEffect } from "react";
import { playSound, Sounds } from "@/hooks/sound";
import Dot from "./Dot";
import { useDojo } from "@/dojo";

const steps = [
{
Expand Down Expand Up @@ -78,9 +79,13 @@ const Tutorial = ({
close: () => void;
}) => {
const [currentStep, setCurrentStep] = useState(1);
const { account, createBurner, isBurnerDeploying } = useDojo();

const onNext = () => {
if (currentStep == steps.length) {
if (!account) {
createBurner();
}
close();
} else {
setCurrentStep(currentStep + 1);
Expand Down Expand Up @@ -127,7 +132,11 @@ const Tutorial = ({
: Sounds.HoverClick
}
>
{currentStep == steps.length ? "READY TO HUSTLE" : "NEXT"}
{currentStep == steps.length
? account
? "READY TO HUSTLE"
: "CREATE BURNER"
: "NEXT"}
</Button>
</VStack>
</ModalFooter>
Expand Down

0 comments on commit fe76071

Please sign in to comment.