Recompute Zotero script reactively on key regenerate

This commit is contained in:
2026-07-06 13:13:19 +05:00
parent 0cbea10e1a
commit fd40b1e394
2 changed files with 4 additions and 4 deletions
+1 -3
View File
@@ -2,7 +2,6 @@ import { headers } from "next/headers";
import { auth } from "@/lib/auth";
import { getMonthlyLimit, getMonthlyUsage, hasPaidAccess } from "@/lib/clean-pdf/access";
import { getOrCreatePdfKey } from "@/lib/clean-pdf/keys";
import { buildZoteroScript } from "@/lib/clean-pdf/zotero-script";
import { CleanPdfForm } from "./CleanPdfForm";
import { ZoteroSection } from "./ZoteroSection";
@@ -29,7 +28,6 @@ export default async function CleanPdfToolPage() {
const [key, used] = await Promise.all([getOrCreatePdfKey(userId), getMonthlyUsage(userId)]);
const limit = getMonthlyLimit();
const baseUrl = process.env.NEXT_PUBLIC_APP_URL ?? "https://school.second-brain.ru";
const zoteroScript = buildZoteroScript({ apiKey: key, baseUrl });
return (
<main className="mx-auto w-full max-w-5xl px-6 py-8">
@@ -43,7 +41,7 @@ export default async function CleanPdfToolPage() {
</div>
<div className="mt-6 card-aubade p-4">
<ZoteroSection apiKey={key} script={zoteroScript} baseUrl={baseUrl} />
<ZoteroSection apiKey={key} baseUrl={baseUrl} />
</div>
</main>
);