-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
92 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 23 additions & 22 deletions
45
frontend/apps/vara-man/src/feature/tournament-game/components/modals/confirm-cancel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
|
||
|
||
import { Modal } from '@/components/ui/modal/modal2'; | ||
import { Button } from '@gear-js/vara-ui'; | ||
import { Modal } from '@/components'; | ||
|
||
type Props = { | ||
setIsOpenCancelModal: (_: boolean) => void | ||
onCancelGame: () => void | ||
} | ||
setIsOpenCancelModal: (_: boolean) => void; | ||
onCancelGame: () => void; | ||
}; | ||
export const ConfirmCancelModal = ({ setIsOpenCancelModal, onCancelGame }: Props) => { | ||
|
||
return ( | ||
<Modal onClose={() => null}> | ||
<h2 className='typo-h2'>Sure you want to end the game?</h2> | ||
<div className="flex flex-col gap-5 mt-5"> | ||
<p className="text-[#555756]"> | ||
This action cannot be undone. The game will be concluded, and all players will exit the gaming room. Any entry fees will be refunded to all players. | ||
</p> | ||
<div className="flex gap-10"> | ||
<Button color='grey' text="End tournament" onClick={onCancelGame} /> | ||
<Button text="Continue tournament" onClick={() => setIsOpenCancelModal(false)} /> | ||
</div> | ||
</div> | ||
</Modal> | ||
) | ||
} | ||
return ( | ||
<Modal open> | ||
<Modal.Content classNameContent="max-w-[700px]"> | ||
<h2 className="typo-h2">Sure you want to end the game?</h2> | ||
<div className="flex flex-col gap-5 mt-5"> | ||
<p className="text-[#555756]"> | ||
This action cannot be undone. The game will be concluded, and all players will exit the gaming room. Any | ||
entry fees will be refunded to all players. | ||
</p> | ||
<div className="flex gap-10"> | ||
<Button color="grey" text="End tournament" onClick={onCancelGame} /> | ||
<Button text="Continue tournament" onClick={() => setIsOpenCancelModal(false)} /> | ||
</div> | ||
</div> | ||
</Modal.Content> | ||
</Modal> | ||
); | ||
}; |
36 changes: 18 additions & 18 deletions
36
frontend/apps/vara-man/src/feature/tournament-game/components/modals/game-canceled.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
|
||
|
||
import { useGame } from '@/app/context/ctx-game'; | ||
import { Modal } from '@/components'; | ||
import { Modal } from '@/components/ui/modal/modal2'; | ||
import { Button } from '@gear-js/vara-ui'; | ||
|
||
export const GameCanceledModal = () => { | ||
const { setPreviousGame } = useGame() | ||
return ( | ||
<Modal onClose={() => null}> | ||
<h2 className='typo-h2' >The game has been canceled by the administrator</h2> | ||
<div className="flex flex-col gap-5 mt-5"> | ||
<p className="text-[#555756]"> | ||
Game administrator Samovit has ended the game. All spent VARA tokens for the entry fee will be refunded. | ||
</p> | ||
<div className="flex gap-10"> | ||
<Button color='grey' text="OK" className="w-1/3" onClick={() => setPreviousGame(null)} /> | ||
</div> | ||
</div> | ||
</Modal> | ||
) | ||
} | ||
const { setPreviousGame } = useGame(); | ||
return ( | ||
<Modal open> | ||
<Modal.Content classNameContent="max-w-[700px]"> | ||
<h2 className="typo-h2">The game has been canceled by the administrator</h2> | ||
<div className="flex flex-col gap-5 mt-5"> | ||
<p className="text-[#555756]"> | ||
Game administrator Samovit has ended the game. All spent VARA tokens for the entry fee will be refunded. | ||
</p> | ||
<div className="flex gap-10"> | ||
<Button color="grey" text="OK" className="w-1/3" onClick={() => setPreviousGame(null)} /> | ||
</div> | ||
</div> | ||
</Modal.Content> | ||
</Modal> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters