chore: clean up scratch files and apply remaining updates

This commit is contained in:
AyrisAI
2026-07-13 14:17:57 +03:00
parent 9866413511
commit 53cbee0841
28 changed files with 986 additions and 284 deletions
+11 -2
View File
@@ -1,5 +1,6 @@
import { mockDb } from '@/lib/mockDb'
import { markMessageReadAction } from '@/app/actions'
import { markMessageReadAction, deleteMessageAction } from '@/app/actions'
import DeleteButton from '@/components/DeleteButton'
import { Check, MailOpen, Mail } from 'lucide-react'
export default async function AdminMessagesPage() {
@@ -54,7 +55,7 @@ export default async function AdminMessagesPage() {
<td className="px-6 py-4 max-w-md">
<p className="text-xs break-words leading-relaxed whitespace-pre-line font-medium">{msg.message}</p>
</td>
<td className="px-6 py-4 text-right whitespace-nowrap">
<td className="px-6 py-4 text-right whitespace-nowrap flex items-center justify-end">
{!msg.isRead ? (
<form action={async () => {
'use server'
@@ -74,6 +75,14 @@ export default async function AdminMessagesPage() {
Okundu
</span>
)}
<form action={async () => {
'use server'
await deleteMessageAction(msg.id)
}} className="ml-2">
<DeleteButton />
</form>
</td>
</tr>
)