Security upgrades

This commit is contained in:
2020-07-15 19:54:48 +02:00
parent 59cc6c54cd
commit ad8ed283d2
3164 changed files with 408897 additions and 28 deletions

View File

@@ -0,0 +1,8 @@
import React from 'react';
var ThemeContext = React.createContext(null);
if (process.env.NODE_ENV !== 'production') {
ThemeContext.displayName = 'ThemeContext';
}
export default ThemeContext;

View File

@@ -0,0 +1 @@
export { default } from './useTheme';

View File

@@ -0,0 +1,12 @@
import React from 'react';
import ThemeContext from './ThemeContext';
export default function useTheme() {
var theme = React.useContext(ThemeContext);
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useDebugValue(theme);
}
return theme;
}