From 396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b Mon Sep 17 00:00:00 2001
From: Fuwn <50817549+Fuwn@users.noreply.github.com>
Date: Sat, 24 Jan 2026 13:09:50 +0000
Subject: Initial commit

Created from https://vercel.com/new
---
 src/app/(main)/websites/WebsitesDataTable.tsx | 47 +++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 src/app/(main)/websites/WebsitesDataTable.tsx

(limited to 'src/app/(main)/websites/WebsitesDataTable.tsx')

diff --git a/src/app/(main)/websites/WebsitesDataTable.tsx b/src/app/(main)/websites/WebsitesDataTable.tsx
new file mode 100644
index 0000000..3f0a6b9
--- /dev/null
+++ b/src/app/(main)/websites/WebsitesDataTable.tsx
@@ -0,0 +1,47 @@
+import Link from 'next/link';
+import { DataGrid } from '@/components/common/DataGrid';
+import { useLoginQuery, useNavigation, useUserWebsitesQuery } from '@/components/hooks';
+import { Favicon } from '@/index';
+import { Icon, Row } from '@umami/react-zen';
+import { WebsitesTable } from './WebsitesTable';
+
+export function WebsitesDataTable({
+  userId,
+  teamId,
+  allowEdit = true,
+  allowView = true,
+  showActions = true,
+}: {
+  userId?: string;
+  teamId?: string;
+  allowEdit?: boolean;
+  allowView?: boolean;
+  showActions?: boolean;
+}) {
+  const { user } = useLoginQuery();
+  const queryResult = useUserWebsitesQuery({ userId: userId || user?.id, teamId });
+  const { renderUrl } = useNavigation();
+
+  const renderLink = (row: any) => (
+    <Row alignItems="center" gap="3">
+      <Icon size="md" color="muted">
+        <Favicon domain={row.domain} />
+      </Icon>
+      <Link href={renderUrl(`/websites/${row.id}`, false)}>{row.name}</Link>
+    </Row>
+  );
+
+  return (
+    <DataGrid query={queryResult} allowSearch allowPaging>
+      {({ data }) => (
+        <WebsitesTable
+          data={data}
+          showActions={showActions}
+          allowEdit={allowEdit}
+          allowView={allowView}
+          renderLink={renderLink}
+        />
+      )}
+    </DataGrid>
+  );
+}
-- 
cgit v1.2.3

