2xl show 8 recents

This commit is contained in:
mbecker20
2024-05-10 17:30:20 -07:00
parent 683a528dd9
commit a5571bcf4d
+9 -6
View File
@@ -13,7 +13,7 @@ import { OpenAlerts } from "@components/alert";
import { useCheckResourceExists, useRead, useUser } from "@lib/hooks";
import { ResourceLink } from "@components/resources/common";
import { Fragment } from "react";
import { usableResourcePath } from "@lib/utils";
import { cn, usableResourcePath } from "@lib/utils";
import { AllUpdates } from "@components/updates/resource";
export const Dashboard = () => {
@@ -67,18 +67,21 @@ const RecentlyViewed = () => {
icon={<History className="w-4 h-4" />}
actions=""
>
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-4">
<div className="grid md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 gap-4">
{recently_viewed
?.filter(checkResourceExists)
.slice(0, 6)
.map(({ type, id }) => (
.slice(0, 8)
.map(({ type, id }, i) => (
<Fragment key={type + id}>
{type !== "System" && (
<Card
onClick={() => nav(`/${usableResourcePath(type)}/${id}`)}
className="px-3 py-2 h-fit hover:bg-accent/50 group-focus:bg-accent/50 transition-colors cursor-pointer"
className={cn(
"px-3 py-2 h-fit hover:bg-accent/50 group-focus:bg-accent/50 transition-colors cursor-pointer",
i > 5 && "hidden 2xl:flex"
)}
>
<CardContent className="flex items-center justify-between gap-4 px-3 py-2 text-sm text-muted-foreground">
<CardContent className="flex items-center justify-between gap-4 px-3 py-2 text-sm text-muted-foreground w-full">
<ResourceLink type={type} id={id} />
{type}
</CardContent>