feat(tenants): make tenant name a link to detail page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-07 05:04:19 -08:00
parent 0bc81bbe40
commit 2813c6a1bf
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
'use client'; 'use client';
import { useState } from 'react'; import { useState } from 'react';
import Link from 'next/link';
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { apiClient } from '@/infrastructure/api/api-client'; import { apiClient } from '@/infrastructure/api/api-client';
@ -267,7 +268,11 @@ export default function TenantsPage() {
<> <>
{/* Main row */} {/* Main row */}
<tr key={tenant.id} className="hover:bg-muted/30"> <tr key={tenant.id} className="hover:bg-muted/30">
<td className="px-4 py-3 font-medium">{tenant.name}</td> <td className="px-4 py-3 font-medium">
<Link href={`/tenants/${tenant.id}`} className="hover:underline text-primary">
{tenant.name}
</Link>
</td>
<td className="px-4 py-3 text-muted-foreground">{tenant.slug}</td> <td className="px-4 py-3 text-muted-foreground">{tenant.slug}</td>
<td className="px-4 py-3"> <td className="px-4 py-3">
{editingId === tenant.id ? ( {editingId === tenant.id ? (