From caeb3bc88cb29d594ac0e96d24b60200dfcb641e Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 27 Nov 2024 16:09:54 +0530 Subject: [PATCH] feat: separate error component --- .../components-next/message/Message.vue | 25 +++------------ .../components-next/message/MessageError.vue | 31 +++++++++++++++++++ 2 files changed, 36 insertions(+), 20 deletions(-) create mode 100644 app/javascript/dashboard/components-next/message/MessageError.vue diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue index c74848292..1821f7836 100644 --- a/app/javascript/dashboard/components-next/message/Message.vue +++ b/app/javascript/dashboard/components-next/message/Message.vue @@ -9,6 +9,7 @@ import { } from './constants'; import TextBubble from './bubbles/Text.vue'; +import MessageError from './MessageError.vue'; import Avatar from 'next/avatar/Avatar.vue'; import Icon from 'next/icon/Icon.vue'; @@ -193,28 +194,12 @@ const shouldGroupWithNext = computed(() => { :orientation class="[grid-area:bubble]" /> -
- {{ 'Failed to send' }} -
-
- -
- -
-
+ :error="error" + />
+import Icon from 'next/icon/Icon.vue'; + +defineProps({ + error: { + type: String, + required: true, + }, +}); + + +