Compare commits

..

No commits in common. "8e10b9e5852c974e1a45824af118488ea6dcd920" and "404a23b2e109144bc4f02d1f3cbc0d0183acc6c4" have entirely different histories.

2 changed files with 9 additions and 14 deletions

View File

@ -5,7 +5,6 @@ import bgStyles from "../styles/Background.module.css";
import { bossToName, bossToReward } from "./BossInfo";
import { bossLevelToClass } from "./Boss";
import { lostSound, wonSound } from "../utils/soundsEffect";
import { useEffect } from "react";
interface BossOutcomeModalProps {
setIsOpen: (val: boolean) => void;
@ -13,20 +12,17 @@ interface BossOutcomeModalProps {
const BossOutcomeModal = ({ setIsOpen }: BossOutcomeModalProps) => {
const { lastBossResult } = usePlayer();
const outcome = lastBossResult?.reward != BigInt(0);
const ascended = lastBossResult?.prestigeGained;
useEffect(() => {
if (lastBossResult != null) {
if (outcome) {
wonSound();
} else {
lostSound();
}
}
}, [outcome, lastBossResult])
if (lastBossResult == null) return null;
const outcome = lastBossResult.reward != BigInt(0);
const ascended = lastBossResult.prestigeGained;
if (outcome) {
wonSound();
} else {
lostSound();
}
const text = outcome ? (
<span>
and you <strong className={styles.won}>won!</strong> 🤩

View File

@ -29,7 +29,6 @@ export const clickSound = () => {
export const lostSound = () => {
const fail = new Howl({
src: ["/sounds/lost.wav"],
volume: 0.7
});
fail.play();