Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3374675
D8148.id27552.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8148.id27552.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8148: [native] Introduce RegistrationContext
Attached
Detach File
Event Timeline
Log In to Comment