forked from baron/baron-sso
chore: consolidate local integration changes
This commit is contained in:
@@ -12,9 +12,14 @@ interface ClientDetailTabsProps {
|
||||
const tabOrder: Array<{
|
||||
key: ClientDetailTab;
|
||||
href: (clientId: string) => string;
|
||||
labelKey?: string;
|
||||
}> = [
|
||||
{ key: "connection", href: (clientId) => `/clients/${clientId}` },
|
||||
{ key: "consents", href: (clientId) => `/clients/${clientId}/consents` },
|
||||
{
|
||||
key: "consents",
|
||||
href: (clientId) => `/clients/${clientId}/consents`,
|
||||
labelKey: "ui.dev.clients.details.tab.user_claims",
|
||||
},
|
||||
{ key: "settings", href: (clientId) => `/clients/${clientId}/settings` },
|
||||
{
|
||||
key: "relationships",
|
||||
@@ -30,12 +35,13 @@ export function ClientDetailTabs({
|
||||
<div className="flex gap-6 overflow-x-auto border-b border-border pb-3 text-sm font-bold">
|
||||
{tabOrder.map((tab) => {
|
||||
const isActive = tab.key === activeTab;
|
||||
const labelKey = tab.labelKey ?? `ui.dev.clients.details.tab.${tab.key}`;
|
||||
return isActive ? (
|
||||
<span
|
||||
key={tab.key}
|
||||
className="whitespace-nowrap border-b-2 border-primary pb-1 text-primary"
|
||||
>
|
||||
{t(`ui.dev.clients.details.tab.${tab.key}`)}
|
||||
{t(labelKey)}
|
||||
</span>
|
||||
) : (
|
||||
<Link
|
||||
@@ -45,7 +51,7 @@ export function ClientDetailTabs({
|
||||
"whitespace-nowrap border-b-2 border-transparent text-muted-foreground hover:text-foreground",
|
||||
)}
|
||||
>
|
||||
{t(`ui.dev.clients.details.tab.${tab.key}`)}
|
||||
{t(labelKey)}
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user