mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
12 lines
314 B
JavaScript
12 lines
314 B
JavaScript
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;
|
|
} |