mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-01 09:13:57 +00:00
Refactor authentication components and enhance user session handling
- Updated AccountPopover to utilize session data for user information display. - Modified ApplicationLayout to fetch user details from the database using Prisma. - Replaced Checkbox components with native input elements in SignUpForm for better accessibility. - Enhanced seed script to include default islands and create related data in the database.
This commit is contained in:
@ -20,7 +20,6 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { Checkbox } from "../ui/checkbox";
|
||||
|
||||
type AtollWithIslands = Prisma.AtollGetPayload<{
|
||||
include: {
|
||||
@ -241,7 +240,8 @@ export default function SignUpForm({ atolls }: { atolls: AtollWithIslands[] }) {
|
||||
)}
|
||||
<div className="flex flex-col gap-2 items-start justify-start py-2">
|
||||
<div className="flex gap-2 items-center">
|
||||
<Checkbox
|
||||
<input
|
||||
type="checkbox"
|
||||
defaultChecked={(actionState.payload?.get("terms") || "") as string === 'on'}
|
||||
name="terms" id="terms" />
|
||||
<label
|
||||
@ -263,7 +263,9 @@ export default function SignUpForm({ atolls }: { atolls: AtollWithIslands[] }) {
|
||||
)}
|
||||
<div className="flex gap-2 items-center">
|
||||
|
||||
<Checkbox
|
||||
<input
|
||||
type="checkbox"
|
||||
defaultChecked={(actionState.payload?.get("policy") || "") as string === 'on'}
|
||||
name="policy" id="terms" />
|
||||
<label
|
||||
htmlFor="terms"
|
||||
|
Reference in New Issue
Block a user