Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
import * as React from 'react';
|
||||
const ThemeContext = /*#__PURE__*/React.createContext(null);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
ThemeContext.displayName = 'ThemeContext';
|
||||
}
|
||||
export default ThemeContext;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import ThemeContext from './ThemeContext';
|
||||
export default function useTheme() {
|
||||
const theme = React.useContext(ThemeContext);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
React.useDebugValue(theme);
|
||||
}
|
||||
return theme;
|
||||
}
|
||||
Reference in New Issue
Block a user