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

Tailwind redesign (#2387)

This commit is contained in:
2025-05-02 22:04:26 -04:00
committed by GitHub
parent c4f67f170b
commit 5058382f71
162 changed files with 2739 additions and 3554 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { NextResponse } from "next/server";
import { unstable_cache as cache } from "next/cache";
import redis from "../../../lib/redis";
import { kv } from "@vercel/kv";
// cache response from the db
const getData = cache(
@@ -14,7 +14,7 @@ const getData = cache(
}>;
}> => {
// get all keys (aka slugs)
const slugs = await redis.scan(0, {
const slugs = await kv.scan(0, {
match: "hits:*",
type: "string",
// set an arbitrary yet generous upper limit, just in case...
@@ -22,7 +22,7 @@ const getData = cache(
});
// get the value (number of hits) for each key (the slug of the page)
const values = await redis.mget<string[]>(...slugs[1]);
const values = await kv.mget<string[]>(...slugs[1]);
// pair the slugs with their hit values
const pages = slugs[1].map((slug, index) => ({