Skip to content

Commit 657adae

Browse files
committed
PIX-56: fix bug on create canvas
1 parent 0ef96ea commit 657adae

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

client/src/views/CreateLobbyView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const handleSubmit = async () => {
175175
isLoading.value = true;
176176
177177
try {
178-
await createLobby({
178+
const response = await createLobby({
179179
name: form.name,
180180
description: form.description,
181181
maxCollaborators: form.maxCollaborators,
@@ -184,8 +184,8 @@ const handleSubmit = async () => {
184184
height: form.height
185185
});
186186
187-
// Redirect to the new lobby or the lobby list
188-
router.push('/lobbies');
187+
// Redirect to the new lobby
188+
router.push(`/play/${response.data._id}`);
189189
} catch (err: any) {
190190
console.error("Create Lobby Error:", err);
191191
error.value = err.response?.data?.error || "Failed to create canvas. Try a different name.";

0 commit comments

Comments
 (0)