import React from 'react';
import { Link } from 'react-router-dom';

const UserList = (props) => {
  return (
  <div>
    {props.addUser.map((user)=>(<div key={user} onClick={props.passInCooks}><Link to="/inventory"><div className="changeColorForUserList">{user}</div></Link></div>))}
  </div>
  );
};

export default UserList;

import React from 'react';
import { Link } from 'react-router-dom';

const UserList = (props) => {
  return (
  <div>
    {props.addUser.map((user)=>(<div className="user" key={user} onClick={props.passInCooks}>Continue as <Link to="/inventory">{user}</Link></div>))}
    <div>or <Link to="/users">go back</Link> and select a different user.</div>
  </div>
  );
};

export default UserList;

Add option to go back and select a different user
Add option to go back and select a different user
