Update all Packages, add emailVerification on change, fix errors
This commit is contained in:
@@ -24,14 +24,15 @@ import { UserOptionalDefaults, UserOptionalDefaultsSchema } from "@repo/db/zod";
|
||||
import { Bell, Plane } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
|
||||
export const ProfileForm = ({ user }: { user: User }) => {
|
||||
export const ProfileForm = ({ user }: { user: User }): React.JSX.Element => {
|
||||
const schema = z.object({
|
||||
firstname: z.string().min(2).max(30),
|
||||
lastname: z.string().min(2).max(30),
|
||||
email: z.string().email({
|
||||
message: "Bitte gebe eine gültige E-Mail Adresse ein",
|
||||
}),
|
||||
settingsHideLastname: z.boolean().default(false),
|
||||
settingsHideLastname: z.boolean(),
|
||||
emailVerified: z.boolean(),
|
||||
});
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
type IFormInput = z.infer<typeof schema>;
|
||||
@@ -108,6 +109,10 @@ export const ProfileForm = ({ user }: { user: User }) => {
|
||||
type="text"
|
||||
className="input input-bordered w-full"
|
||||
defaultValue={user.email}
|
||||
onChange={(e) => {
|
||||
form.setValue("email", e.target.value.trim());
|
||||
form.setValue("emailVerified", false);
|
||||
}}
|
||||
placeholder="E-Mail"
|
||||
/>
|
||||
</label>
|
||||
@@ -135,7 +140,7 @@ export const SocialForm = ({
|
||||
}: {
|
||||
discordAccount?: DiscordAccount;
|
||||
user: User;
|
||||
}) => {
|
||||
}): React.JSX.Element | null => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [vatsimLoading, setVatsimLoading] = useState(false);
|
||||
const router = useRouter();
|
||||
@@ -238,7 +243,7 @@ export const SocialForm = ({
|
||||
);
|
||||
};
|
||||
|
||||
export const PasswordForm = () => {
|
||||
export const PasswordForm = (): React.JSX.Element => {
|
||||
const schema = z.object({
|
||||
password: z.string().min(2).max(30),
|
||||
newPassword: z.string().min(2).max(30),
|
||||
@@ -335,7 +340,7 @@ export const PasswordForm = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const PilotForm = ({ user }: { user: User }) => {
|
||||
export const PilotForm = ({ user }: { user: User }): React.JSX.Element | null => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const form = useForm<UserOptionalDefaults>({
|
||||
|
||||
@@ -10,51 +10,51 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^4.1.3",
|
||||
"@hookform/resolvers": "^5.0.1",
|
||||
"@next-auth/prisma-adapter": "^1.0.7",
|
||||
"@radix-ui/react-icons": "^1.3.2",
|
||||
"@repo/db": "*",
|
||||
"@tanstack/react-query": "^5.67.2",
|
||||
"@tanstack/react-table": "^8.20.6",
|
||||
"@uiw/react-md-editor": "^4.0.5",
|
||||
"axios": "^1.7.9",
|
||||
"@tanstack/react-query": "^5.79.0",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"@uiw/react-md-editor": "^4.0.7",
|
||||
"axios": "^1.9.0",
|
||||
"bcryptjs": "^3.0.2",
|
||||
"clsx": "^2.1.1",
|
||||
"date-fns": "^4.1.0",
|
||||
"i": "^0.3.7",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"lodash": "^4.17.21",
|
||||
"lucide-react": "^0.479.0",
|
||||
"next": "^15.2.2",
|
||||
"lucide-react": "^0.511.0",
|
||||
"next": "^15.3.3",
|
||||
"next-auth": "^4.24.11",
|
||||
"next-remove-imports": "^1.0.12",
|
||||
"npm": "^11.1.0",
|
||||
"react": "^19.0.0",
|
||||
"react-datepicker": "^8.1.0",
|
||||
"react-day-picker": "^9.6.2",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-error-boundary": "^5.0.0",
|
||||
"react-hook-form": "^7.54.2",
|
||||
"react-hot-toast": "^2.5.1",
|
||||
"react-select": "^5.10.0",
|
||||
"tailwind-merge": "^3.0.2",
|
||||
"zod": "^3.24.1"
|
||||
"npm": "^11.4.1",
|
||||
"react": "^19.1.0",
|
||||
"react-datepicker": "^8.4.0",
|
||||
"react-day-picker": "^9.7.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-error-boundary": "^6.0.0",
|
||||
"react-hook-form": "^7.56.4",
|
||||
"react-hot-toast": "^2.5.2",
|
||||
"react-select": "^5.10.1",
|
||||
"tailwind-merge": "^3.3.0",
|
||||
"zod": "^3.25.46"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
"@repo/eslint-config": "*",
|
||||
"@repo/typescript-config": "*",
|
||||
"@tailwindcss/postcss": "^4.0.8",
|
||||
"@types/bcryptjs": "^2.4.6",
|
||||
"@types/jsonwebtoken": "^9.0.8",
|
||||
"@types/node": "^22.13.10",
|
||||
"@tailwindcss/postcss": "^4.1.8",
|
||||
"@types/bcryptjs": "^3.0.0",
|
||||
"@types/jsonwebtoken": "^9.0.9",
|
||||
"@types/node": "^22.15.29",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
"daisyui": "^5.0.0-beta.8",
|
||||
"daisyui": "^5.0.43",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "^15.2.2",
|
||||
"postcss": "^8.5.3",
|
||||
"tailwindcss": "^4.0.8",
|
||||
"eslint-config-next": "^15.3.3",
|
||||
"postcss": "^8.5.4",
|
||||
"tailwindcss": "^4.1.8",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user