We have used yarn start to compile the react app files.
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from "react-router-dom";
import { Provider } from "react-redux";
import { configureStore } from "@reduxjs/toolkit";
import rootReducer from "./slices";
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
const store = configureStore({ reducer: rootReducer, devTools: true });
root.render(
<React.StrictMode>
<Provider store={store}>
<BrowserRouter basename={process.env.PUBLIC_URL}>
<App />
</BrowserRouter>
</Provider>
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
import React from 'react';
//import Scss
import './assets/scss/themes.scss';
//imoprt Route
import RouteIndex from 'Routes/Index';
// Import Firebase Configuration file
// import { initFirebaseBackend } from "./helpers/firebase_helper";
// Fake Backend
import fakeBackend from "./helpers/AuthType/fakeBackend";
// Activating fake backend
fakeBackend();
// const firebaseConfig = {
// apiKey: process.env.REACT_APP_API_KEY,
// authDomain: process.env.REACT_APP_AUTHDOMAIN,
// databaseURL: process.env.REACT_APP_DATABASEURL,
// projectId: process.env.REACT_APP_PROJECTID,
// storageBucket: process.env.REACT_APP_STORAGEBUCKET,
// messagingSenderId: process.env.REACT_APP_MESSAGINGSENDERID,
// appId: process.env.REACT_APP_APPID,
// measurementId: process.env.REACT_APP_MEASUREMENTID,
// };
// init firebase backend
// initFirebaseBackend(firebaseConfig);
function App() {
return (
<React.Fragment>
<RouteIndex />
</React.Fragment>
);
}
export default App;