Add private chat to multiplayer rooms
This commit is contained in:
@@ -6,6 +6,7 @@ import { useRouter } from "next/navigation";
|
||||
import { Copy, Users, Crown, Trophy } from "lucide-react";
|
||||
import { Brand } from "./Brand";
|
||||
import { MultiplayerGame } from "./MultiplayerGame";
|
||||
import { RoomChat } from "./RoomChat";
|
||||
import { useI18n } from "./I18nProvider";
|
||||
import { api } from "@/lib/client-api";
|
||||
import { roundClock } from "@/shared/round-clock";
|
||||
@@ -125,6 +126,13 @@ export function MultiplayerRoom({ id }: { id: string }) {
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
<RoomChat
|
||||
key={id}
|
||||
id={id}
|
||||
playerId={room.you}
|
||||
available={room.status !== "closed"}
|
||||
playing
|
||||
/>
|
||||
</>
|
||||
);
|
||||
const owner = !!room?.you && room.you === room.hostId;
|
||||
@@ -362,6 +370,13 @@ export function MultiplayerRoom({ id }: { id: string }) {
|
||||
</>
|
||||
)}
|
||||
</main>
|
||||
<RoomChat
|
||||
key={id}
|
||||
id={id}
|
||||
playerId={room?.you ?? null}
|
||||
available={!!room && room.status !== "closed"}
|
||||
playing={false}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user