fixup crash

This commit is contained in:
oiov
2025-04-25 16:21:29 +08:00
parent eb6615a69b
commit fa659e96da
3 changed files with 24 additions and 14 deletions
+17 -13
View File
@@ -101,18 +101,22 @@ const LogsTable = ({ userId, target }) => {
onChange={(e) => handleFilterChange("ip", e.target.value)}
className="h-8 max-w-xs placeholder:text-xs"
/>
<Input
placeholder="Filter by Name..."
value={filters.name}
onChange={(e) => handleFilterChange("name", e.target.value)}
className="h-8 max-w-xs placeholder:text-xs"
/>
<Input
placeholder="Filter by Email..."
value={filters.email}
onChange={(e) => handleFilterChange("email", e.target.value)}
className="h-8 max-w-xs placeholder:text-xs"
/>
{
<>
<Input
placeholder="Filter by Name..."
value={filters.name}
onChange={(e) => handleFilterChange("name", e.target.value)}
className="h-8 max-w-xs placeholder:text-xs"
/>
<Input
placeholder="Filter by Email..."
value={filters.email}
onChange={(e) => handleFilterChange("email", e.target.value)}
className="h-8 max-w-xs placeholder:text-xs"
/>
</>
}
<Button
variant="outline"
@@ -178,7 +182,7 @@ const LogsTable = ({ userId, target }) => {
{log.link}
</TableCell>
<TableCell className="max-w-md truncate p-2">
{log.user.name || log.user.email}
{log.user?.name || log.user?.email}
</TableCell>
</TableRow>
))}
+6
View File
@@ -103,6 +103,12 @@ export async function getScrapeStatsByUserId({
ip: true,
link: true,
createdAt: true,
user: {
select: {
name: true,
email: true,
},
},
},
}),
]);
+1 -1
View File
File diff suppressed because one or more lines are too long