Allow getting team websites.

This commit is contained in:
Mike Cao 2025-09-12 08:21:29 -07:00
parent e610de383a
commit 433ce98719
10 changed files with 79 additions and 56 deletions

View file

@ -1,20 +1,23 @@
import Link from 'next/link';
import { WebsitesTable } from './WebsitesTable';
import { DataGrid } from '@/components/common/DataGrid';
import { useNavigation, useUserWebsitesQuery } from '@/components/hooks';
import { useLoginQuery, useNavigation, useUserWebsitesQuery } from '@/components/hooks';
export function WebsitesDataTable({
userId,
teamId,
allowEdit = true,
allowView = true,
showActions = true,
}: {
userId?: string;
teamId?: string;
allowEdit?: boolean;
allowView?: boolean;
showActions?: boolean;
}) {
const queryResult = useUserWebsitesQuery({ teamId });
const { user } = useLoginQuery();
const queryResult = useUserWebsitesQuery({ userId: userId || user?.id, teamId });
const { renderUrl } = useNavigation();
const renderLink = (row: any) => (