Skip to content

Commit

Permalink
fix some compile errors for now
Browse files Browse the repository at this point in the history
  • Loading branch information
naueramant committed May 20, 2024
1 parent a31d1c2 commit 8df22b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
8 changes: 5 additions & 3 deletions src/components/Terminal/commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Buffer, Command } from "./models";
import * as sounds from "../../hooks/sounds";
import useGame from "../../stores/game";
import { getCardSuitName } from "../../models/card";
import useGame from "../../stores/game";
import { Buffer, Command } from "./models";

export const customCommands: Command[] = [
{
Expand Down Expand Up @@ -37,7 +37,9 @@ export const customCommands: Command[] = [
switch (args[0]) {
case "play":
buffer.write("Playing sound...");
sounds.play(args[1] as sounds.SoundName, args[2] === "--loop");
sounds.play(args[1] as sounds.SoundName, {
loop: args[2] === "--loop",
});
break;
case "stop":
buffer.write("Stopping all sounds...");
Expand Down
10 changes: 4 additions & 6 deletions src/views/Login/Continue/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ import {
import { FunctionComponent, useEffect, useState } from "react";
import { Helmet } from "react-helmet";
import { NavLink } from "react-router-dom";
import PlayerItem from "../components/PlayerItem";
import * as GameAPI from "../../../api/endpoints/game";
import { Player } from "../../../models/player";
import { datetimeToddmmHHMMSS } from "../../../utilities/time";
import Conditional from "../../../components/Conditional";
import { Player } from "../../../models/player";
import useGame from "../../../stores/game";
import { mapToLocal } from "../../../stores/game.mapper";
import { stopAll } from "../../../hooks/sounds";
import { datetimeToddmmHHMMSS } from "../../../utilities/time";
import ContinueGameDialog from "../components/ContinueGameDialog";
import PlayerItem from "../components/PlayerItem";

const ContinueGameView: FunctionComponent = () => {
const theme = useTheme();
Expand Down Expand Up @@ -65,7 +64,6 @@ const ContinueGameView: FunctionComponent = () => {
return;
}

stopAll();
Resume(mapToLocal(selectedGame));
};

Expand Down Expand Up @@ -112,7 +110,7 @@ const ContinueGameView: FunctionComponent = () => {

<CardContent>
<PlayerItem
onLogin={async (p) => {
onReady={async (p) => {
setPlayer(p);
}}
onRemove={() => {
Expand Down
6 changes: 0 additions & 6 deletions src/views/Login/components/PlayerList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ const PlayerList: FunctionComponent<PlayerListProps> = (props) => {

return newPlayers;
});

props.onChange?.(Object.values(newPlayers));
}, [props.numberOfPlayers]);

return (
Expand All @@ -43,8 +41,6 @@ const PlayerList: FunctionComponent<PlayerListProps> = (props) => {
const newPlayers = { ...prev };
newPlayers[i] = p;

props.onChange?.(Object.values(newPlayers));

return newPlayers;
});
}}
Expand All @@ -53,8 +49,6 @@ const PlayerList: FunctionComponent<PlayerListProps> = (props) => {
const newPlayers = { ...prev };
delete newPlayers[i];

props.onChange?.(Object.values(newPlayers));

return newPlayers;
});
}}
Expand Down

0 comments on commit 8df22b6

Please sign in to comment.