Skip to content

Commit

Permalink
fix(@cubejs-client/playground): avoid styles override
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilev-alex committed Jan 18, 2021
1 parent d5dad60 commit 4bdae02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 2 additions & 5 deletions packages/cubejs-playground/src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-undef,react/jsx-no-target-blank */
import React, { Component, createContext } from 'react';
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import '@ant-design/compatible/assets/index.css';
import './index.less';
Expand All @@ -10,6 +10,7 @@ import { withRouter } from 'react-router';
import Header from './components/Header';
import { event, setAnonymousId } from './events';
import GlobalStyles from './components/GlobalStyles';
import { AppContext } from './hooks/slow-query';

const selectedTab = (pathname) => {
if (pathname === '/template-gallery') {
Expand All @@ -19,10 +20,6 @@ const selectedTab = (pathname) => {
}
};

export const AppContext = createContext({
slowQuery: false,
});

class App extends Component {
static getDerivedStateFromError(error) {
return { fatalError: error };
Expand Down
7 changes: 5 additions & 2 deletions packages/cubejs-playground/src/hooks/slow-query.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { useContext } from 'react';
import { AppContext } from '../App';
import { useContext, createContext } from 'react';

export const AppContext = createContext({
slowQuery: false,
});

export default function useSlowQuery() {
const { slowQuery } = useContext(AppContext);
Expand Down

0 comments on commit 4bdae02

Please sign in to comment.