+
-
+
+
diff --git a/components/layout/LeftSideContent.vue b/components/layout/LeftSideContent.vue
index 929ab62..697d9e0 100644
--- a/components/layout/LeftSideContent.vue
+++ b/components/layout/LeftSideContent.vue
@@ -1,7 +1,7 @@
@@ -89,13 +87,14 @@ const connectWallet = async () => {
}
}
};
-
+const router = useRouter();
const disconnectWallet = async () => {
if (window.ethereum) {
try {
logger.info('Disconnecting account');
await window.ethereum.request({ method: 'eth_accounts' });
accountStore.disconnect();
+ router.push('/');
} catch (error) {
logger.error(error);
}
diff --git a/components/layout/RightSideChat.vue b/components/layout/RightSideChat.vue
index 31a05e2..b45d8da 100644
--- a/components/layout/RightSideChat.vue
+++ b/components/layout/RightSideChat.vue
@@ -164,7 +164,7 @@ onMounted(async () => {
}
.side-item {
- @apply w-full flex justify-start items-center gap-2 text-white;
+ @apply w-full flex justify-start items-center gap-2;
}
&.right-nav-expanded {
diff --git a/pages/chat/[id].vue b/pages/chat/[id].vue
index 46d65fe..923a7b6 100644
--- a/pages/chat/[id].vue
+++ b/pages/chat/[id].vue
@@ -6,7 +6,7 @@
-
+
(error = e)" />
@@ -49,6 +49,10 @@ if (!chat.value) {
}
const messages = computed(() => chatStore.getMessages(Number(route.params.id)));
+const isMine = (message: ChatMessageResponseDTO) => {
+ return message.sender.address === accountStore.account;
+};
+
const pageNumber = ref(1);
onMounted(async () => {
diff --git a/pages/profile/index.vue b/pages/profile/index.vue
new file mode 100644
index 0000000..d34e3f7
--- /dev/null
+++ b/pages/profile/index.vue
@@ -0,0 +1,7 @@
+
+ Your profile
+
+
+
+
+
diff --git a/store/chat.ts b/store/chat.ts
index ef8211e..f816077 100644
--- a/store/chat.ts
+++ b/store/chat.ts
@@ -27,7 +27,7 @@ export const useChatStore = defineStore({
this.invitations = invitations;
},
setMessages(chatId: number, messages: ChatMessageResponseDTO[]) {
- this.messages[chatId] = messages;
+ this.messages[chatId] = messages.reverse();
},
addMessage(chatId: number, message: ChatMessageResponseDTO) {
if (!this.messages[chatId]) {