|
1 | | -import { ThemedImage } from '@/components/themed-image/themed-image'; |
| 1 | +// import { ThemedImage } from '@/components/themed-image/themed-image'; |
2 | 2 | import type { BrandingTheme } from '@/modules/auth/types'; |
3 | 3 | import { ThemedLogo } from '@datum-cloud/datum-ui/logo/themed'; |
4 | 4 | import { Link } from 'react-router'; |
5 | 5 |
|
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. |
9 | 9 | // |
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 { |
16 | 14 | 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" /> |
31 | 17 | </Link> |
32 | 18 | ); |
| 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 | + // ); |
33 | 43 | } |
0 commit comments