Files
zitadel/apps/login/src/components/address-bar.tsx
T
0945195f68 chore: deps update (#11968)
# Which Problems Are Solved
This pr updates major and minor dependencies and is the first step on
getting our dependabot alerts cut down.

# How the Problems Are Solved

Depedency updates across the board eg:
- Upgrade Angular to v21
- Upgrade next.js to v16.2
- Upgrade tailwind to v4 in the login
- Upgrade vitest to v4 in the login

This is an uncompleted list refer to the changed files for a full
overview of all the updates.

# Additional Changes

Migrated all control flow in the console to the modern control flow
syntax.
Fixed the dependsOn setting for the @zitadel/login:test-unit nx target.

# Additional Context

- Closes https://github.com/zitadel/zitadel/issues/11274

---------

Co-authored-by: Max Peintner <[email protected]>
2026-04-02 15:53:08 +02:00

57 lines
1.7 KiB
TypeScript

"use client";
import { usePathname } from "next/navigation";
import { Fragment } from "react";
type Props = {
domain: string;
};
export function AddressBar({ domain }: Props) {
const pathname = usePathname();
return (
<div className="flex items-center space-x-2 overflow-hidden p-3.5 lg:px-5 lg:py-3">
<div className="text-gray-600">
<svg xmlns="http://www.w3.org/2000/svg" className="h-4" viewBox="0 0 20 20" fill="currentColor">
<path
fillRule="evenodd"
d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
clipRule="evenodd"
/>
</svg>
</div>
<div className="flex space-x-1 text-sm font-medium">
<div className="max-w-[150px] overflow-hidden px-2 text-ellipsis text-gray-500">
<span className="whitespace-nowrap">{domain}</span>
</div>
{pathname ? (
<>
<span className="text-gray-600">/</span>
{pathname
.split("/")
.slice(1)
.filter((s) => !!s)
.map((segment) => {
return (
<Fragment key={segment}>
<span>
<span
key={segment}
className="animate-[highlight_1s_ease-in-out_1] rounded-full px-1.5 py-0.5 text-gray-800 dark:text-gray-100"
>
{segment}
</span>
</span>
<span className="text-gray-600">/</span>
</Fragment>
);
})}
</>
) : null}
</div>
</div>
);
}