Skip to content

Commit 322cca9

Browse files
committed
chore(brand-logo): hardcode datum-ui logo; comment out org-branding swap
1 parent 4ff8c4c commit 322cca9

1 file changed

Lines changed: 34 additions & 24 deletions

File tree

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,43 @@
1-
import { ThemedImage } from '@/components/themed-image/themed-image';
1+
// import { ThemedImage } from '@/components/themed-image/themed-image';
22
import type { BrandingTheme } from '@/modules/auth/types';
33
import { ThemedLogo } from '@datum-cloud/datum-ui/logo/themed';
44
import { Link } from 'react-router';
55

6-
// The home-link + logo swap shared by the auth layouts: the org's branding logo when
7-
// present, else the Datum mark. Each layout keeps its own wrapper div + className;
8-
// this owns only the <Link> + logo conditional so the two stay byte-identical.
6+
// TEMP — hardcoded to the datum-ui Datum mark, ignoring org branding.
7+
// The original per-org branding-logo swap is preserved (commented) below; restore it
8+
// (and the ThemedImage import above) to bring org logos from Zitadel branding back.
99
//
10-
// Both branches are theme-aware:
11-
// - org logo → <ThemedImage>: branding.darkLogoUrl (from Zitadel's darkTheme) on dark,
12-
// falling back to logoUrl when no dark variant is configured.
13-
// - Datum mark → <ThemedLogo.Flat>: datum-ui resolves `brand` on light / `mono-light`
14-
// on dark via useTheme (SSR-safe, brand fallback before hydration).
15-
export function BrandLogo({ branding }: { branding?: BrandingTheme | null }): React.JSX.Element {
10+
// The Datum mark is theme-aware: <ThemedLogo.Flat> resolves `brand` on light /
11+
// `mono-light` on dark via useTheme (SSR-safe, brand fallback before hydration), and
12+
// names the home link itself via aria-label="Datum".
13+
export function BrandLogo(_props: { branding?: BrandingTheme | null }): React.JSX.Element {
1614
return (
17-
// When an org logo is shown the image is decorative (aria-hidden), so the link needs its own
18-
// accessible name; the Datum fallback gets its name from <ThemedLogo.Flat aria-label="Datum">.
19-
<Link to="/" aria-label={branding?.logoUrl ? 'Home' : undefined}>
20-
{branding?.logoUrl ? (
21-
<ThemedImage
22-
light={branding.logoUrl}
23-
dark={branding.darkLogoUrl}
24-
alt=""
25-
aria-hidden="true"
26-
className="h-6 w-auto"
27-
/>
28-
) : (
29-
<ThemedLogo.Flat aria-label="Datum" className="h-6 w-auto" />
30-
)}
15+
<Link to="/">
16+
<ThemedLogo.Flat aria-label="Datum" className="h-6 w-auto" />
3117
</Link>
3218
);
19+
20+
// ── Original: org branding logo when present, else the Datum mark ──
21+
// Both branches are theme-aware:
22+
// - org logo → <ThemedImage>: branding.darkLogoUrl (from Zitadel's darkTheme) on dark,
23+
// falling back to logoUrl when no dark variant is configured.
24+
// - Datum mark → <ThemedLogo.Flat>: datum-ui resolves `brand` on light / `mono-light` on dark.
25+
//
26+
// return (
27+
// // When an org logo is shown the image is decorative (aria-hidden), so the link needs its own
28+
// // accessible name; the Datum fallback gets its name from <ThemedLogo.Flat aria-label="Datum">.
29+
// <Link to="/" aria-label={branding?.logoUrl ? 'Home' : undefined}>
30+
// {branding?.logoUrl ? (
31+
// <ThemedImage
32+
// light={branding.logoUrl}
33+
// dark={branding.darkLogoUrl}
34+
// alt=""
35+
// aria-hidden="true"
36+
// className="h-6 w-auto"
37+
// />
38+
// ) : (
39+
// <ThemedLogo.Flat aria-label="Datum" className="h-6 w-auto" />
40+
// )}
41+
// </Link>
42+
// );
3343
}

0 commit comments

Comments
 (0)