Skip to content

Commit b7b822e

Browse files
committed
Apply previous changes to event page too
1 parent 66e2f78 commit b7b822e

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

web/src/overrides/PageTitle.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import { functionTypePrettyName } from "@src/utils/functions";
3-
const funcType = (Astro.locals.funcType ?? 'shared') as 'client' | 'server' | 'shared';
3+
const funcType = (Astro.locals.side ?? 'shared');
44
---
55

66
<div class={`page-title-container type-${funcType}`}>

web/src/pages/reference/[event].astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ event.data.itemType = "event";
3434
const eventType = event.data.type;
3535
const eventPath = path.dirname(event.filePath ?? "");
3636
let eventExamples = event.data.examples || [];
37+
Astro.locals.side = eventType;
3738
3839
const eventParameters = event.data.parameters || [];
3940
let parametersCode = "";
@@ -74,7 +75,6 @@ const needsChecking =
7475
eventMeta.find((m) => m.needs_checking)?.needs_checking ?? undefined;
7576
---
7677

77-
<div class={"show-type-badge-" + eventType}>
7878
<StarlightPage
7979
frontmatter={{
8080
template: "doc",
@@ -172,7 +172,6 @@ const needsChecking =
172172
currentId={event.id}
173173
/>
174174
</StarlightPage>
175-
</div>
176175

177176
<style>
178177
.help-icon {

web/src/pages/reference/[func].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const funcType = funcInfo.type;
4040
const funcPair = funcInfo.pair;
4141
const funcPath = path.dirname(func.filePath ?? "");
4242
43-
Astro.locals.funcType = funcType;
43+
Astro.locals.side = funcType;
4444
4545
// Join shared, client, and server examples
4646
let funcExamples: any[] = [];

web/src/utils/globals_locals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare namespace App {
22
interface Locals {
3-
funcType: 'client' | 'server' | 'shared';
3+
side: 'client' | 'server' | 'shared';
44
}
55
}

0 commit comments

Comments
 (0)