
import { useState, useEffect,useContext } from 'react';
import { Row,Col } from 'react-bootstrap';
import UserContext from '../UserContext';
import { Navigate } from 'react-router-dom';
import UpdateUserProfile from './UpdateUserProfile';
export default function Profile(){

  const {user} = useContext(UserContext);

  return (

  	// checks if the user token is null.if null navigate to 
    	(user.id === null) ?
  			<Navigate to="/login" />
	     :

        <Row>
          <Col className='p-5 bg-success text-white'>
            <h1 className='my-5'>Profile</h1>
            <h1 className='mt-3'>James Delacruz</h1>
            <hr />
            <h4>Contacts</h4>
            <ul>
                <li>Email:jamesDC@email.com</li>
                <li>mobile No: 09333444942</li>
            </ul>
          </Col>
      </Row>
    
  )
}
