feat(user): Add User Detail

This commit is contained in:
web@ppanel
2025-02-02 14:40:29 +07:00
parent 6733fc211c
commit fdaf11b654
66 changed files with 1977 additions and 704 deletions
@@ -0,0 +1,50 @@
'use client';
import { ProTable } from '@/components/pro-table';
import { formatDate } from '@workspace/ui/utils';
import { useTranslations } from 'next-intl';
import { useParams } from 'next/navigation';
export default function UserLoginHistory() {
const t = useTranslations('user');
const { id } = useParams<{ id: string }>();
return (
<ProTable<
{
ip: string;
user_agent: string;
created_at: string;
},
Record<string, unknown>
>
columns={[
{
accessorKey: 'ip',
header: t('loginIp'),
},
{
accessorKey: 'user_agent',
header: t('userAgent'),
},
{
accessorKey: 'created_at',
header: t('loginTime'),
cell: ({ row }) => formatDate(row.getValue('created_at')),
},
]}
params={[
{
key: 'search',
placeholder: t('searchIp'),
},
]}
request={async (pagination, filter) => {
return {
list: [],
total: 0,
};
}}
/>
);
}