mirror of https://github.com/msgbyte/tailchat
refactor: 增加groupId上下文
parent
e6d9322c0c
commit
4ba7bc728e
@ -0,0 +1,10 @@
|
||||
import React, { useContext } from 'react';
|
||||
|
||||
const GroupIdContext = React.createContext<string>('');
|
||||
GroupIdContext.displayName = 'GroupIdContext';
|
||||
|
||||
export const GroupIdContextProvider = GroupIdContext.Provider;
|
||||
|
||||
export function useGroupIdContext() {
|
||||
return useContext(GroupIdContext);
|
||||
}
|
Loading…
Reference in New Issue