X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fhelpers%2FUserContext.js;h=927f262e5f01be3b0599860a1b4bbc281e389405;hb=7c6716036321ba09846785720e81459aad55a323;hp=507af7d3122154c5ad2ed1a455a5c495278df881;hpb=9aca4f1a99af65dc988d2f66e122e25456a4efd9;p=alttp.git diff --git a/resources/js/helpers/UserContext.js b/resources/js/helpers/UserContext.js index 507af7d..927f262 100644 --- a/resources/js/helpers/UserContext.js +++ b/resources/js/helpers/UserContext.js @@ -2,6 +2,8 @@ import React from 'react'; const UserContext = React.createContext(null); +export const useUser = () => React.useContext(UserContext); + export const withUser = (WrappedComponent, as) => function WithUserContext(props) { return {user => }