File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
static/app/views/performance/browser/webVitals Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 1
1
export const USE_STORED_SCORES = false ;
2
+ export const REPLACE_FID_WITH_INP = false ;
Original file line number Diff line number Diff line change
1
+ import { decodeScalar } from 'sentry/utils/queryString' ;
2
+ import { useLocation } from 'sentry/utils/useLocation' ;
3
+ import useOrganization from 'sentry/utils/useOrganization' ;
4
+ import { REPLACE_FID_WITH_INP } from 'sentry/views/performance/browser/webVitals/settings' ;
5
+
6
+ export function useReplaceFidWithInpSetting ( ) {
7
+ const location = useLocation ( ) ;
8
+ const { query} = location ;
9
+ const organization = useOrganization ( ) ;
10
+
11
+ if ( query . replaceFidWithInp !== undefined ) {
12
+ return decodeScalar ( query . replaceFidWithInp ) === 'true' ;
13
+ }
14
+
15
+ if ( organization . features . includes ( 'starfish-browser-webvitals-replace-fid-with-inp' ) ) {
16
+ return true ;
17
+ }
18
+
19
+ return REPLACE_FID_WITH_INP ;
20
+ }
You can’t perform that action at this time.
0 commit comments