Skip to content

Commit ad5065e

Browse files
committed
allow to send message with enter pressed
1 parent 4a270fe commit ad5065e

File tree

1 file changed

+5
-6
lines changed
  • frontend/src/components/app/matches

1 file changed

+5
-6
lines changed

frontend/src/components/app/matches/Chat.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@
3232
>{{message.content}}</h1>
3333
</div>
3434
</div>
35-
<div class="send w-full flex items-stretch">
35+
<form v-on:submit.prevent="sendMessage()" class="send w-full flex items-stretch">
3636
<div class="w-10/12 h-full">
3737
<input type="text" v-model="message" placeholder="Message..." class="h-full w-full border border-gray-500 rounded-md px-3 py-1 focus:outline-none active:outline-none text-gray-matcha">
3838
</div>
39-
<div
40-
class="w-2/12 rounded-md flex justify-center items-center bg-purple-matcha cursor-pointer ml-2"
41-
v-on:click="sendMessage()">
39+
<button type="submit"
40+
class="w-2/12 rounded-md flex justify-center items-center bg-purple-matcha cursor-pointer ml-2">
4241
<img src="../../../assets/sendWhite.png" class="w-5 py-2">
43-
</div>
44-
</div>
42+
</button>
43+
</form>
4544
</div>
4645
</template>
4746

0 commit comments

Comments
 (0)