Page MenuHomePhabricator

D8148.id27552.diff
No OneTemporary

D8148.id27552.diff

diff --git a/native/account/registration/registration-context-provider.react.js b/native/account/registration/registration-context-provider.react.js
new file mode 100644
--- /dev/null
+++ b/native/account/registration/registration-context-provider.react.js
@@ -0,0 +1,19 @@
+// @flow
+
+import * as React from 'react';
+
+import { RegistrationContext } from './registration-context.js';
+
+type Props = {
+ +children: React.Node,
+};
+function RegistrationContextProvider(props: Props): React.Node {
+ const contextValue = React.useMemo(() => ({}), []);
+ return (
+ <RegistrationContext.Provider value={contextValue}>
+ {props.children}
+ </RegistrationContext.Provider>
+ );
+}
+
+export { RegistrationContextProvider };
diff --git a/native/account/registration/registration-context.js b/native/account/registration/registration-context.js
new file mode 100644
--- /dev/null
+++ b/native/account/registration/registration-context.js
@@ -0,0 +1,10 @@
+// @flow
+
+import * as React from 'react';
+
+export type RegistrationContextType = {};
+
+const RegistrationContext: React.Context<?RegistrationContextType> =
+ React.createContext<?RegistrationContextType>();
+
+export { RegistrationContext };
diff --git a/native/root.react.js b/native/root.react.js
--- a/native/root.react.js
+++ b/native/root.react.js
@@ -22,6 +22,7 @@
import { MediaCacheProvider } from 'lib/components/media-cache-provider.react.js';
import { actionLogger } from 'lib/utils/action-logger.js';
+import { RegistrationContextProvider } from './account/registration/registration-context-provider.react.js';
import { EditThreadAvatarProvider } from './avatars/edit-thread-avatar-provider.react.js';
import { EditUserAvatarProvider } from './avatars/edit-user-avatar-provider.react.js';
import ChatContextProvider from './chat/chat-context-provider.react.js';
@@ -267,19 +268,23 @@
<MarkdownContextProvider>
<ChatContextProvider>
<MessageSearchProvider>
- <SQLiteDataHandler />
- <ConnectedStatusBar />
- <ReduxPersistGate persistor={getPersistor()}>
- {gated}
- </ReduxPersistGate>
- <PersistedStateGate>
- <Socket
- detectUnsupervisedBackgroundRef={
- detectUnsupervisedBackgroundRef
- }
- />
- </PersistedStateGate>
- {navigation}
+ <RegistrationContextProvider>
+ <SQLiteDataHandler />
+ <ConnectedStatusBar />
+ <ReduxPersistGate
+ persistor={getPersistor()}
+ >
+ {gated}
+ </ReduxPersistGate>
+ <PersistedStateGate>
+ <Socket
+ detectUnsupervisedBackgroundRef={
+ detectUnsupervisedBackgroundRef
+ }
+ />
+ </PersistedStateGate>
+ {navigation}
+ </RegistrationContextProvider>
</MessageSearchProvider>
</ChatContextProvider>
</MarkdownContextProvider>

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 4:42 PM (20 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2591022
Default Alt Text
D8148.id27552.diff (3 KB)

Event Timeline