next-auth-mfelfelani72 0.0.45 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { RegisterProps } from "../../../types";
|
|
3
|
-
export default function Register({ layout, theme, className, }: RegisterProps): React.JSX.Element;
|
|
3
|
+
export default function Register({ layout, theme, className, translations, }: RegisterProps): React.JSX.Element;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: Mohammad Felfelani
|
|
3
|
+
* @Email: mfelfelani72@gmail.com
|
|
4
|
+
* @Team:
|
|
5
|
+
* @Date: 2025-10-04 11:48:20
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
"use client";
|
|
2
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
10
|
import { useState, useMemo, lazy } from "react";
|
|
11
|
+
// Functions
|
|
4
12
|
import { cn } from "forma-li";
|
|
13
|
+
import { setTranslationOverrides } from "../../../locale";
|
|
14
|
+
// Constants
|
|
5
15
|
const LazyTwoColumn = lazy(() => import("../../../components/demo/auth/layouts/twoColumn/RegisterLanding"));
|
|
6
16
|
const LAYOUT_MAP = {
|
|
7
17
|
twoColumn: LazyTwoColumn,
|
|
8
18
|
};
|
|
9
|
-
export default function Register({ layout = "twoColumn", theme, className, }) {
|
|
19
|
+
export default function Register({ layout = "twoColumn", theme, className, translations, }) {
|
|
20
|
+
setTranslationOverrides(translations);
|
|
10
21
|
const [errors, setErrors] = useState({});
|
|
11
22
|
const [message, setMessage] = useState(null);
|
|
12
23
|
const validate = (formData) => {
|
|
@@ -69,5 +80,5 @@ export default function Register({ layout = "twoColumn", theme, className, }) {
|
|
|
69
80
|
}, [layout]);
|
|
70
81
|
return (_jsx("div", { style: {
|
|
71
82
|
backgroundImage: `url('/images/jpg/${theme || "default"}_auth.jpeg')`,
|
|
72
|
-
}, className: cn("z-10 w-full max-w-md px-4 max-h-screen bg-cover bg-center bg-fixed overflow-hidden", className), children: _jsx(RenderUi, { onSubmit: handleSubmit, errors: errors, message: message, theme: theme }) }));
|
|
83
|
+
}, className: cn("z-10 w-full max-w-md px-4 max-h-screen bg-cover bg-center bg-fixed overflow-hidden", className), children: _jsx(RenderUi, { onSubmit: handleSubmit, errors: errors, message: message, theme: theme, translations: translations }) }));
|
|
73
84
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -18,14 +18,18 @@ export interface LoginProps {
|
|
|
18
18
|
export interface RegisterComponentProps {
|
|
19
19
|
onSubmit: (formData: FormData) => void;
|
|
20
20
|
errors?: {
|
|
21
|
+
name?: string;
|
|
21
22
|
email?: string;
|
|
22
23
|
password?: string;
|
|
24
|
+
confirmPassword?: string;
|
|
23
25
|
};
|
|
24
26
|
message?: string | null;
|
|
25
27
|
theme?: string;
|
|
28
|
+
translations?: Partial<Record<Lang, Partial<Dictionary>>>;
|
|
26
29
|
}
|
|
27
30
|
export interface RegisterProps {
|
|
28
31
|
layout: string;
|
|
29
32
|
theme?: string;
|
|
30
33
|
className?: string;
|
|
34
|
+
translations?: Partial<Record<Lang, Partial<Dictionary>>>;
|
|
31
35
|
}
|