File: samples/react/src/Components/Home.js

Recommend this page to a friend!
  Classes of Arturs Sosins  >  Countly Web SDK  >  samples/react/src/Components/Home.js  >  Download  
File: samples/react/src/Components/Home.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: 4 months ago
Size: 517 bytes
 

Contents

Class file image Download
import React from 'react';

import Users from './Users';
import countlyImage from './countly.jpg';

function Home() {
    let userIndex = localStorage.getItem("clydemo-user");
    let user = {};

    if (userIndex !== undefined && userIndex !== null) {
        user = Users[userIndex] || {};
    }

    return (
        <div>
            <center>
                <img src={countlyImage} alt="Home"></img>
                <h1>Welcome {user.name}</h1>
            </center>
        </div>
    );
}

export default Home;