@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@goplusvn/core",
3
3
  "description": "GoPlusVN Platform Kit - ERP kernel: layout, RBAC, CRUD, multi-tenant, system pages",
4
- "version": "0.1.36",
4
+ "version": "0.1.37",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org",
@@ -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
- <Image
51
- src="/images/icons/shadboard.svg"
52
- alt="Logo"
53
- height={24}
54
- width={24}
55
- className="dark:invert"
56
- />
57
- <span>GoERP</span>
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>