Skip to content

Commit 5bd1f1f

Browse files
committed
post work
2 parents 07e8ea0 + e76fe81 commit 5bd1f1f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/components/UserPage.jsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ const UserPage = () => {
6262
}));
6363

6464
console.log(`Messages found: ${messagesData.length}`);
65+
66+
if (messagesData.length === 0)
67+
{
68+
messagesData =
69+
[
70+
{ id: 'spoof1', sender: 'Dr. AI', text: 'Welcome to the research network!', timestamp: Date.now() },
71+
{ id: 'spoof2', sender: 'Admin', text: 'Remember to check your updates.', timestamp: Date.now() - 500000 },
72+
{ id: 'spoof3', sender: 'Colleague', text: 'Did you review my paper draft?', timestamp: Date.now() - 1000000 },
73+
];
74+
console.log("Added spoof messages.");
75+
}
76+
77+
78+
6579
setMessages(messagesData); // Update state with messages
6680
} catch (err) {
6781
console.error('Error fetching messages:', err);

0 commit comments

Comments
 (0)