File tree 2 files changed +1
-40
lines changed
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';
19
19
import { getDevDocsFrontMatter , getDocsFrontMatter , getFileBySlug } from 'sentry-docs/mdx' ;
20
20
import { mdxComponents } from 'sentry-docs/mdxComponents' ;
21
21
import { setServerContext } from 'sentry-docs/serverContext' ;
22
- import { formatGuideOrPlatformTitle } from 'sentry-docs/utils' ;
23
22
24
23
export async function generateStaticParams ( ) {
25
24
const docs = await ( isDeveloperDocs ? getDevDocsFrontMatter ( ) : getDocsFrontMatter ( ) ) ;
@@ -141,9 +140,7 @@ export async function generateMetadata({params}: MetadataProps): Promise<Metadat
141
140
const guideOrPlatform = getCurrentPlatformOrGuide ( rootNode , params . path ) ;
142
141
title =
143
142
pageNode . frontmatter . title +
144
- ( guideOrPlatform
145
- ? ` | Sentry for ${ formatGuideOrPlatformTitle ( guideOrPlatform . name ) } `
146
- : '' ) ;
143
+ ( guideOrPlatform ? ` | Sentry for ${ guideOrPlatform . title } ` : '' ) ;
147
144
description = pageNode . frontmatter . description ?? '' ;
148
145
}
149
146
}
Original file line number Diff line number Diff line change @@ -18,42 +18,6 @@ export const capitalize = (str: string) => {
18
18
return str . charAt ( 0 ) . toUpperCase ( ) + str . slice ( 1 ) ;
19
19
} ;
20
20
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
-
57
21
export const uniqByReference = < T > ( arr : T [ ] ) : T [ ] => Array . from ( new Set ( arr ) ) ;
58
22
59
23
export const splitToChunks = < T > ( numChunks : number , arr : T [ ] ) : T [ ] [ ] => {
You can’t perform that action at this time.
0 commit comments