File: samples/react/src/App-WithEffect.js

Recommend this page to a friend!
  Classes of Arturs Sosins  >  Countly Web SDK  >  samples/react/src/App-WithEffect.js  >  Download  
File: samples/react/src/App-WithEffect.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Countly Web SDK
Track site accesses and errors the Countly API
Author: By
Last change:
Date: 1 year ago
Size: 815 bytes


Class file image Download
import React, { useState } from 'react';
import {
  BrowserRouter as Router,
} from "react-router-dom";

import Home from './Components/Home';
import Contact from './Components/Contact';
import Header from './Components/Header';

import Location from './Location-WithEffect';

const App = () => {
  const [loginState, setLoginState] = useState(localStorage.getItem("clydemo-login-state") ? true: false);

  return (
    <Router basename={`${process.env.PUBLIC_URL}`}>
        <Header loginState={loginState} setLoginState={setLoginState} />
          <Route path="/contact">
            <Contact />
          <Route path="/">
            <Home />

export default App;