mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-06-28 07:01:44 +00:00
Refactor user verification and data handling
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 55s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 55s
- Updated `package.json` to add a new script for Prisma database setup. - Replaced `usePerson` hook with `getNationalPerson` function in `lib/person.ts` for improved national data fetching. - Refactored imports in `auth-actions.ts`, `user-actions.ts`, and `verify/page.tsx` to use the new `getNationalPerson` function. - Enhanced device notification logic in `check-devices/route.ts` to correctly handle payment data. - Improved error handling in `devices-to-pay.tsx` for better user feedback. These changes streamline user verification processes and enhance data integrity across the application.
This commit is contained in:
@ -2,7 +2,7 @@ import InputReadOnly from '@/components/input-read-only';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import UserRejectDialog from '@/components/user/user-reject-dialog';
|
||||
import { UserVerifyDialog } from '@/components/user/user-verify-dialog';
|
||||
import usePerson from '@/hooks/use-person';
|
||||
import { getNationalPerson } from '@/lib/person';
|
||||
|
||||
import prisma from '@/lib/db';
|
||||
import Image from 'next/image';
|
||||
@ -28,7 +28,7 @@ export default async function VerifyUserPage({
|
||||
}
|
||||
})
|
||||
|
||||
const nationalData = await usePerson({ idCard: dbUser?.id_card ?? "" })
|
||||
const nationalData = await getNationalPerson({ idCard: dbUser?.id_card ?? "" })
|
||||
return (
|
||||
<div>
|
||||
<div className='flex items-center justify-between text-gray-500 text-2xl font-bold title-bg py-4 px-2 mb-4'>
|
||||
|
Reference in New Issue
Block a user