Skip to content

Commit 3b8129c

Browse files
committed
perf: add header caching for sheet
1 parent 3249b36 commit 3b8129c

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

apps/web/src/app/(main)/sheet/[moduleId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default async function SheetModulePage({ params }: PageProps) {
3636
href={sheetModule.videoUrl}
3737
target="_blank"
3838
rel="noopener noreferrer"
39-
className="inline-flex items-center gap-2 text-brand-purple hover:text-brand-purple-light transition-colors"
39+
className="inline-flex items-center gap-2 text-brand-purple-light hover:text-brand-purple transition-colors"
4040
>
4141
<svg
4242
className="w-5 h-5"

apps/web/src/app/(main)/sheet/[moduleId]/sheet-content.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.sheetContent h3 {
10-
@apply mt-10 mb-5 text-lg font-semibold text-brand-purple;
10+
@apply mt-10 mb-5 text-lg font-semibold text-brand-purple-light;
1111
}
1212

1313
.sheetContent h2 {
@@ -19,11 +19,11 @@
1919
}
2020

2121
.sheetContent a {
22-
@apply text-brand-purple underline;
22+
@apply text-brand-purple-light underline;
2323
}
2424

2525
.sheetContent a:hover {
26-
@apply text-brand-purple-light;
26+
@apply text-brand-purple;
2727
}
2828

2929
.sheetContent strong {
@@ -48,11 +48,11 @@
4848
}
4949

5050
.sheetContent blockquote {
51-
@apply border-l-2 border-brand-purple pl-4 italic text-text-tertiary my-4;
51+
@apply border-l-2 border-brand-purple-light pl-4 italic text-text-tertiary my-4;
5252
}
5353

5454
.sheetContent code {
55-
@apply text-brand-purple bg-surface-tertiary px-1.5 py-0.5 rounded text-sm;
55+
@apply text-brand-purple-light bg-surface-tertiary px-1.5 py-0.5 rounded text-sm;
5656
}
5757

5858
.sheetContent pre {

apps/web/src/app/api/sheet/modules/route.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ function loadModulesMetadata(): Omit<SheetModule, "docContent">[] {
5252

5353
export async function GET() {
5454
const modules = loadModulesMetadata();
55-
return NextResponse.json(modules);
55+
return NextResponse.json(modules, {
56+
headers: {
57+
"Cache-Control": "public, s-maxage=3600, stale-while-revalidate=86400",
58+
},
59+
});
5660
}
57-

apps/web/src/components/sheet/SheetModuleHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function SheetModuleHeader({
112112
<div className="flex items-center justify-between mb-8">
113113
<Link
114114
href="/dashboard/sheet"
115-
className="inline-flex items-center gap-2 text-brand-purple hover:text-brand-purple-light transition-colors text-sm font-medium"
115+
className="inline-flex items-center gap-2 text-brand-purple-light hover:text-brand-purple transition-colors text-sm font-medium"
116116
>
117117
<ArrowLeft className="w-4 h-4" />
118118
Back to Sheet

0 commit comments

Comments
 (0)