-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2586 from GetStream/develop
Next Release
- Loading branch information
Showing
24 changed files
with
1,376 additions
and
1,388 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...tnative/common-content/contexts/thread-context/parent_message_prevent_press.mdx
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,5 @@ | ||
Boolean to enable/disable parent message press. | ||
|
||
| Type | Default | | ||
| ------- | ------- | | ||
| Boolean | `true` | |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
export const STREAM_API_KEY = 'q95x9hkbyd6p'; | ||
export const userToken = | ||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoicm9uIn0.eRVjxLvd4aqCEHY_JRa97g6k7WpHEhxL7Z4K4yTot1c'; | ||
|
||
export const user = { | ||
id: 'ron', | ||
}; |
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,39 +1,33 @@ | ||
import { PropsWithChildren, createContext, useContext, useState } from "react"; | ||
import { StreamChatGenerics } from "../types"; | ||
import { Channel as ChannelType } from "stream-chat"; | ||
import { ThreadContextValue } from "stream-chat-expo"; | ||
import { PropsWithChildren, createContext, useContext, useState } from 'react'; | ||
import { StreamChatGenerics } from '../types'; | ||
import { Channel as ChannelType } from 'stream-chat'; | ||
import { ThreadContextValue } from 'stream-chat-expo'; | ||
|
||
export type AppContextType = { | ||
channel: ChannelType<StreamChatGenerics> | undefined; | ||
setChannel: React.Dispatch< | ||
React.SetStateAction<ChannelType<StreamChatGenerics> | undefined> | ||
>; | ||
setThread: React.Dispatch< | ||
React.SetStateAction< | ||
ThreadContextValue<StreamChatGenerics>["thread"] | undefined | ||
> | ||
>; | ||
thread: ThreadContextValue<StreamChatGenerics>["thread"] | undefined; | ||
channel: ChannelType<StreamChatGenerics> | undefined; | ||
setChannel: React.Dispatch<React.SetStateAction<ChannelType<StreamChatGenerics> | undefined>>; | ||
setThread: React.Dispatch< | ||
React.SetStateAction<ThreadContextValue<StreamChatGenerics>['thread'] | undefined> | ||
>; | ||
thread: ThreadContextValue<StreamChatGenerics>['thread'] | undefined; | ||
}; | ||
|
||
export const AppContext = createContext<AppContextType>({ | ||
channel: undefined, | ||
setChannel: undefined, | ||
setThread: undefined, | ||
thread: undefined, | ||
channel: undefined, | ||
setChannel: undefined, | ||
setThread: undefined, | ||
thread: undefined, | ||
}); | ||
|
||
export const AppProvider = ({ children }: PropsWithChildren) => { | ||
const [channel, setChannel] = useState< | ||
ChannelType<StreamChatGenerics> | undefined | ||
>(undefined); | ||
const [thread, setThread] = useState< | ||
ThreadContextValue<StreamChatGenerics>["thread"] | undefined | ||
>(undefined); | ||
const [channel, setChannel] = useState<ChannelType<StreamChatGenerics> | undefined>(undefined); | ||
const [thread, setThread] = useState< | ||
ThreadContextValue<StreamChatGenerics>['thread'] | undefined | ||
>(undefined); | ||
|
||
return ( | ||
<AppContext.Provider value={{ channel, setChannel, thread, setThread }}> | ||
{children} | ||
</AppContext.Provider> | ||
); | ||
return ( | ||
<AppContext.Provider value={{ channel, setChannel, thread, setThread }}> | ||
{children} | ||
</AppContext.Provider> | ||
); | ||
}; |
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
Oops, something went wrong.