File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,6 @@ import { showToolbarToggle } from "./toolbar";
3131
3232const isMobile = typeof window !== "undefined" && window . innerWidth < 768 ;
3333const isNode = typeof document === "undefined" ; // deno supports "window" but not "document" according to https://remix.run/docs/en/main/guides/gotchas
34- const isReactNative =
35- typeof navigator !== "undefined" &&
36- / R e a c t N a t i v e / i. test ( navigator . userAgent ?? "" ) ;
3734
3835/**
3936 * (Internal) User context.
@@ -459,7 +456,6 @@ export class ReflagClient {
459456 ! this . config . offline &&
460457 this . context ?. user &&
461458 ! isNode && // do not prompt on server-side
462- ! isReactNative && // disable SSE-based auto feedback in React Native
463459 opts ?. feedback ?. enableAutoFeedback !== false // default to on
464460 ) {
465461 if ( isMobile ) {
Original file line number Diff line number Diff line change @@ -78,14 +78,27 @@ export type {
7878} ;
7979
8080export function ReflagProvider ( props : ReflagProps ) {
81- return < BaseProvider { ...props } storage = { props . storage ?? AsyncStorage } /> ;
81+ return (
82+ < BaseProvider
83+ { ...props }
84+ storage = { props . storage ?? AsyncStorage }
85+ feedback = { {
86+ ...props . feedback ,
87+ enableAutoFeedback : props . feedback ?. enableAutoFeedback ?? false ,
88+ } }
89+ />
90+ ) ;
8291}
8392
8493export function ReflagBootstrappedProvider ( props : ReflagBootstrappedProps ) {
8594 return (
8695 < BaseBootstrappedProvider
8796 { ...props }
8897 storage = { props . storage ?? AsyncStorage }
98+ feedback = { {
99+ ...props . feedback ,
100+ enableAutoFeedback : props . feedback ?. enableAutoFeedback ?? false ,
101+ } }
89102 />
90103 ) ;
91104}
You can’t perform that action at this time.
0 commit comments