FrontEnd/src/user/components/UserItem.js
// use dynamic expression for Link component to change to different users page
use dynamic expression for Link component to change to different users page
use dynamic expression for Link component to change to different users page
function UserItem(props) {
	return (
		<Link to={`/${props.id}/places`}>
			<Card>
				<Card.Img
					className="user-image"
					variant="top"
					src={props.image}
					alt={props.name}
				/>
				<Card.Body>
					<Card.Text>
						{props.first_name} {props.last_name}{" "}
						{props.places.length}{" "}
						{props.places.length === 1 ? "Place" : "Places"}
					</Card.Text>
				</Card.Body>
			</Card>
		</Link>
	);
}
function UserItem ( props ) { return ( < Link to = { ` ${ props . id } ` } > < Card > < Card . Img className = "user-image" variant = "top" src = { props . image } alt = { props . name } / > < Card . Body > < Card . Text > { props . first_name } { props . last_name } { " " } { props . places . length } { " " } { props . places . length === 1 ? "Place" : "Places" } < / Card . Text > < / Card . Body > < / Card > < / Link > ) ; }
use dynamic expression for Link component to change to different users page
use dynamic expression for Link component to change to different users page
// link to dynamic user id using react dom // return the single user's first name, last name, number of places upload