File tree Expand file tree Collapse file tree 2 files changed +1
-40
lines changed
Expand file tree Collapse file tree 2 files changed +1
-40
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
1919import { getDevDocsFrontMatter , getDocsFrontMatter , getFileBySlug } from 'sentry-docs/mdx' ;
2020import { mdxComponents } from 'sentry-docs/mdxComponents' ;
2121import { setServerContext } from 'sentry-docs/serverContext' ;
22- import { formatGuideOrPlatformTitle } from 'sentry-docs/utils' ;
2322
2423export async function generateStaticParams ( ) {
2524 const docs = await ( isDeveloperDocs ? getDevDocsFrontMatter ( ) : getDocsFrontMatter ( ) ) ;
@@ -141,9 +140,7 @@ export async function generateMetadata({params}: MetadataProps): Promise<Metadat
141140 const guideOrPlatform = getCurrentPlatformOrGuide ( rootNode , params . path ) ;
142141 title =
143142 pageNode . frontmatter . title +
144- ( guideOrPlatform
145- ? ` | Sentry for ${ formatGuideOrPlatformTitle ( guideOrPlatform . name ) } `
146- : '' ) ;
143+ ( guideOrPlatform ? ` | Sentry for ${ guideOrPlatform . title } ` : '' ) ;
147144 description = pageNode . frontmatter . description ?? '' ;
148145 }
149146 }
Original file line number Diff line number Diff line change @@ -18,42 +18,6 @@ export const capitalize = (str: string) => {
1818 return str . charAt ( 0 ) . toUpperCase ( ) + str . slice ( 1 ) ;
1919} ;
2020
21- export const formatGuideOrPlatformTitle = ( title : string ) => {
22- const lowerCase = title . toLowerCase ( ) ;
23-
24- switch ( lowerCase ) {
25- case 'ios' :
26- return 'iOS' ;
27-
28- case 'macos' :
29- return 'macOS' ;
30-
31- case 'tvos' :
32- return 'tvOS' ;
33-
34- case 'visionos' :
35- return 'visionOS' ;
36-
37- case 'watchos' :
38- return 'watchOS' ;
39-
40- case 'dotnet' :
41- return '.NET' ;
42-
43- case 'kotlin-multiplatform' :
44- return 'Kotlin Multiplatform' ;
45-
46- case 'php' :
47- return 'PHP' ;
48-
49- case 'react-native' :
50- return 'React Native' ;
51-
52- default :
53- return capitalize ( title ) ;
54- }
55- } ;
56-
5721export const uniqByReference = < T > ( arr : T [ ] ) : T [ ] => Array . from ( new Set ( arr ) ) ;
5822
5923export const splitToChunks = < T > ( numChunks : number , arr : T [ ] ) : T [ ] [ ] => {
You can’t perform that action at this time.
0 commit comments