Files
nextjs-boilerplate/app/[locale]/admin/logs/page.tsx
T

29 lines
1016 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { supabaseAdmin } from '@/lib/supabaseAdmin'
import LogsTabs from './LogsTabs'
export default async function LogsPage() {
const [{ data: crashes }, { data: licenseEvents }] = await Promise.all([
supabaseAdmin
.from('crash_reports')
.select('id, event_type, severity, error_name, error_message, module, app_version, os, device_id, created_at')
.order('created_at', { ascending: false })
.limit(50),
supabaseAdmin
.from('license_events')
.select('id, event_type, license_id, device_id, ip_address, app_version, created_at')
.order('created_at', { ascending: false })
.limit(50),
])
return (
<div className="space-y-6">
<div>
<h2 className="text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Loglar</h2>
<p className="text-gray-500 dark:text-gray-400 mt-2">Son 50 hata kaydı ve lisans olayı.</p>
</div>
<LogsTabs crashes={crashes || []} licenseEvents={licenseEvents || []} />
</div>
)
}