chore: clean up scratch files and apply remaining updates
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user