@ -31,7 +31,11 @@ const DefaultCurrentAccountProvider: React.FC<ICurrentAccountProvider> = ({ chil
|
||||
return <CurrentAccountContext.Provider value={value}>{children}</CurrentAccountContext.Provider>;
|
||||
};
|
||||
|
||||
const useCurrentAccount = () => useContext(CurrentAccountContext)?.me || null;
|
||||
const useCurrentAccount = () => {
|
||||
const context = useContext(CurrentAccountContext);
|
||||
|
||||
return context ? context.me : null;
|
||||
};
|
||||
|
||||
const useCurrentAccountContext = () => useContext(CurrentAccountContext);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user