vitess.io/vitess@v0.16.2/web/vtadmin/src/index.tsx (about)

     1  /**
     2   * Copyright 2020 The Vitess Authors.
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  import React from 'react';
    17  import ReactDOM from 'react-dom';
    18  import { QueryClient, QueryClientProvider } from 'react-query';
    19  
    20  import './index.css';
    21  import './components/charts/charts.scss';
    22  
    23  import { App } from './components/App';
    24  import * as errorHandler from './errors/errorHandler';
    25  
    26  errorHandler.initialize();
    27  
    28  const queryClient = new QueryClient({
    29      defaultOptions: {
    30          queries: {
    31              refetchOnWindowFocus: false,
    32          },
    33      },
    34  });
    35  
    36  ReactDOM.render(
    37      <React.StrictMode>
    38          <QueryClientProvider client={queryClient}>
    39              <App />
    40          </QueryClientProvider>
    41      </React.StrictMode>,
    42      document.getElementById('root')
    43  );