@goplusvn/core 0.1.36 → 0.1.37
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.
- package/package.json +1 -1
- package/src/ui/auth/auth-layout.tsx +23 -8
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import type { LocaleType } from "../../types";
|
|
|
8
8
|
|
|
9
9
|
import { ensureLocalizedPathname, cn } from "../../utils";
|
|
10
10
|
import { LanguageDropdown } from "../layout";
|
|
11
|
+
import { useOptionalTenant } from "../../providers/tenant-provider";
|
|
11
12
|
|
|
12
13
|
import type { StaticImageData } from "next/image";
|
|
13
14
|
|
|
@@ -32,6 +33,9 @@ export function Auth({
|
|
|
32
33
|
}: AuthProps) {
|
|
33
34
|
const params = useParams();
|
|
34
35
|
const locale = (params.lang as LocaleType) || "vi";
|
|
36
|
+
// Branding của tenant (nếu app mount TenantProvider). Fallback về logo/tên mặc
|
|
37
|
+
// định để các app chưa cấu hình branding giữ nguyên hành vi cũ.
|
|
38
|
+
const branding = useOptionalTenant()?.branding;
|
|
35
39
|
|
|
36
40
|
return (
|
|
37
41
|
<section
|
|
@@ -47,14 +51,25 @@ export function Auth({
|
|
|
47
51
|
href={ensureLocalizedPathname("/", locale)}
|
|
48
52
|
className="flex items-center gap-2 text-foreground font-black"
|
|
49
53
|
>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
{branding?.logo ? (
|
|
55
|
+
<Image
|
|
56
|
+
src={branding.logo}
|
|
57
|
+
alt={branding.companyName || "Logo"}
|
|
58
|
+
height={24}
|
|
59
|
+
width={24}
|
|
60
|
+
className="object-contain"
|
|
61
|
+
unoptimized
|
|
62
|
+
/>
|
|
63
|
+
) : (
|
|
64
|
+
<Image
|
|
65
|
+
src="/images/icons/shadboard.svg"
|
|
66
|
+
alt="Logo"
|
|
67
|
+
height={24}
|
|
68
|
+
width={24}
|
|
69
|
+
className="dark:invert"
|
|
70
|
+
/>
|
|
71
|
+
)}
|
|
72
|
+
<span>{branding?.companyName || "GoERP"}</span>
|
|
58
73
|
</Link>
|
|
59
74
|
<LanguageDropdown dictionary={dictionary} />
|
|
60
75
|
</div>
|