File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- export const chartSource = ( ) => {
1+ function isCloudflarePages ( ) {
2+ return window . location . hostname . includes ( 'cf' ) ;
3+ }
4+ function isVercel ( ) {
5+ return window . location . hostname . includes ( 'vercel' ) ;
6+ }
7+ function isEdgeOne ( ) {
8+ return window . location . hostname . includes ( 'eo' ) ;
9+ }
10+
11+ export function getChartSource ( ) {
212 if ( isCloudflarePages ( ) ) {
313 return process . env . CHARTS_SOURCE_CF ;
414 } else if ( isVercel ( ) ) {
@@ -10,12 +20,6 @@ export const chartSource = () => {
1020 }
1121}
1222
13- function isCloudflarePages ( ) {
14- return window . location . hostname . includes ( 'cf' ) ;
15- }
16- function isVercel ( ) {
17- return window . location . hostname . includes ( 'vercel' ) ;
18- }
19- function isEdgeOne ( ) {
20- return window . location . hostname . includes ( 'eo' ) ;
21- }
23+
24+ export const chartSource = getChartSource ( ) ;
25+
You can’t perform that action at this time.
0 commit comments