diff --git a/components/dashboard/userAccount/sidebars/comments/index.js b/components/dashboard/userAccount/sidebars/comments/index.js
index 2c8a2c5..fa6e8bd 100644
--- a/components/dashboard/userAccount/sidebars/comments/index.js
+++ b/components/dashboard/userAccount/sidebars/comments/index.js
@@ -1,15 +1,25 @@
import Comment from "./Comment";
function Comments({ user, loading }) {
+ const comments = user?.comments ?? [];
+
+ if (comments.length === 0) {
+ return (
+
+ نظری ثبت نکردهاید.
+
+ );
+ }
+
return (
- {user.comments.map((item, idx) => (
+ {comments.map((item, idx) => (
))}
diff --git a/components/dashboard/userAccount/sidebars/messages/index.js b/components/dashboard/userAccount/sidebars/messages/index.js
index 20d4419..80a6256 100644
--- a/components/dashboard/userAccount/sidebars/messages/index.js
+++ b/components/dashboard/userAccount/sidebars/messages/index.js
@@ -1,15 +1,25 @@
import Message from "./Message";
function Messages({ user, loading }) {
+ const messages = user?.messages ?? [];
+
+ if (messages.length === 0) {
+ return (
+
+ پیامی ندارید.
+
+ );
+ }
+
return (
- {user.messages.map((item, idx) => (
+ {messages.map((item, idx) => (
))}