1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-05 19:15:30 -04:00

save a redis query when fetching all view counts

This commit is contained in:
2025-05-06 20:24:55 -04:00
parent a08ec532b3
commit 0df56d127a
6 changed files with 40 additions and 32 deletions
+5 -2
View File
@@ -12,14 +12,17 @@ const Menu = ({ className, ...rest }: ComponentPropsWithoutRef<"ul">) => {
return (
<ul
className={cn("flex max-w-2/3 flex-row justify-between md:max-w-none md:justify-end md:space-x-4", className)}
className={cn(
"flex max-w-2/3 flex-row justify-between md:max-w-none md:justify-end md:space-x-4 max-sm:[&>li]:first-of-type:hidden",
className
)}
{...rest}
>
{menuItems.map((item) => {
const isCurrent = item.href?.split("/")[1] === segment;
return (
<li className="inline-block max-sm:first-of-type:hidden" key={item.href}>
<li className="inline-block" key={item.href}>
<MenuItem {...item} current={isCurrent} />
</li>
);