This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(pages): [conversations] use react context to share the data …
…between components
- Loading branch information
1 parent
c10ae9f
commit 6aa2b49
Showing
4 changed files
with
115 additions
and
102 deletions.
There are no files selected for viewing
176 changes: 89 additions & 87 deletions
176
src/modules/conversations/components/ConversationsSidebar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/modules/conversations/pages/ConversationsMainPageContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
const ConversationsMainPageContext = React.createContext({}); | ||
|
||
export const ConversationsMainPageProvider = ConversationsMainPageContext.Provider; | ||
export const ConversationsMainPageConsumer = ConversationsMainPageContext.Consumer; | ||
export default ConversationsMainPageContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './ConversationsMainPage'; | ||
export * from './ConversationsMainPageContext'; |