github.com/minio/console@v1.4.1/web-app/src/index.tsx (about)

     1  // This file is part of MinIO Console Server
     2  // Copyright (c) 2021 MinIO, Inc.
     3  //
     4  // This program is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Affero General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // This program is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12  // GNU Affero General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Affero General Public License
    15  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    16  
    17  import React from "react";
    18  import * as serviceWorker from "./serviceWorker";
    19  import ReactDOM from "react-dom/client";
    20  import { Provider } from "react-redux";
    21  import { store } from "./store";
    22  import MainRouter from "./MainRouter";
    23  import StyleHandler from "./StyleHandler";
    24  
    25  const root = ReactDOM.createRoot(
    26    document.getElementById("root") as HTMLElement,
    27  );
    28  
    29  root.render(
    30    <React.StrictMode>
    31      <Provider store={store}>
    32        <StyleHandler>
    33          <MainRouter />
    34        </StyleHandler>
    35      </Provider>
    36    </React.StrictMode>,
    37  );
    38  
    39  // If you want your app to work offline and load faster, you can change
    40  // unregister() to register() below. Note this comes with some pitfalls.
    41  // Learn more about service workers: https://bit.ly/CRA-PWA
    42  serviceWorker.unregister();