File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22import { 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 } ` } >
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ event.data.itemType = "event";
3434const eventType = event .data .type ;
3535const eventPath = path .dirname (event .filePath ?? " " );
3636let eventExamples = event .data .examples || [];
37+ Astro .locals .side = eventType ;
3738
3839const eventParameters = event .data .parameters || [];
3940let 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 {
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const funcType = funcInfo.type;
4040const funcPair = funcInfo .pair ;
4141const funcPath = path .dirname (func .filePath ?? " " );
4242
43- Astro .locals .funcType = funcType ;
43+ Astro .locals .side = funcType ;
4444
4545// Join shared, client, and server examples
4646let funcExamples: any [] = [];
Original file line number Diff line number Diff line change 11declare namespace App {
22 interface Locals {
3- funcType : 'client' | 'server' | 'shared' ;
3+ side : 'client' | 'server' | 'shared' ;
44 }
55}
You can’t perform that action at this time.
0 commit comments