diff --git a/projectSecondPart/components/userDetail/userDetail.jsx b/projectSecondPart/components/userDetail/userDetail.jsx index f824526b3856961d70cad5ed377d64d5e1ef2952..d7c252ae427c5859d4795910a23566aeaa32be99 100644 --- a/projectSecondPart/components/userDetail/userDetail.jsx +++ b/projectSecondPart/components/userDetail/userDetail.jsx @@ -1,5 +1,7 @@ import React from 'react'; import './userDetail.css'; +import {Link} from "react-router-dom"; +import {Typography} from "@material-ui/core"; /** @@ -14,14 +16,15 @@ class UserDetail extends React.Component { generateUserPreview() { let user = window.cs142models.userListModel().find(e => e._id === this.props.match.params.userId) console.log(user) - return (<div id="DivUserPreview"> + return ( + <Typography variant="body1"> <h2>{user.first_name} {user.last_name}</h2> <p> Occupation: {user.occupation} <br /> From: {user.location} <br /> Description: {user.description} </p> - </div> + </Typography> ) } @@ -30,6 +33,7 @@ class UserDetail extends React.Component { return ( <div id="divUserDetail"> {this.generateUserPreview()} + <Link to={"/photos/" + this.props.match.params.userId}>See photos!</Link> </div> ); } diff --git a/projectSecondPart/components/userPhotos/userPhotos.jsx b/projectSecondPart/components/userPhotos/userPhotos.jsx index a980ea9fb59c564c172846b487215a0e0f687c76..181e0617c1b86e4440e9085dc43090761b2c92d2 100644 --- a/projectSecondPart/components/userPhotos/userPhotos.jsx +++ b/projectSecondPart/components/userPhotos/userPhotos.jsx @@ -11,7 +11,7 @@ import './userPhotos.css'; class UserPhotos extends React.Component { constructor(props) { super(props); - + console.log(window.cs142models.photoOfUserModel(this.props.match.params.userId)) } render() { diff --git a/projectSecondPart/photoShare.jsx b/projectSecondPart/photoShare.jsx index f0e1f87601c21996a7dfa70fb57dad3fd5b30753..9c010b41c0109674fe438840e6fb755f4969cced 100644 --- a/projectSecondPart/photoShare.jsx +++ b/projectSecondPart/photoShare.jsx @@ -4,7 +4,7 @@ import { HashRouter, Route, Switch } from 'react-router-dom'; import { - Grid, Typography, Paper + Grid, Paper } from '@material-ui/core'; import './styles/main.css';