Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"editor.fontLigatures": false,
"editor.fontFamily": " Consolas, 'Courier New', monospace"
"editor.fontLigatures": false,
"editor.fontFamily": "Menlo, 'Courier New', monospace"
}
818 changes: 411 additions & 407 deletions client/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions client/src/components/ClubBookshelf.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ function ClubBookshelf(props) {
<h5 className="card-title">{b.title}</h5>
<div className="card-text">
<h6>By {b.author}</h6>
<h7>
<h6>
Discussed on:
<br></br> {formatDate(b.date)}{" "}
</h7>
</h6>
</div>
</div>
</div>
Expand Down
12 changes: 7 additions & 5 deletions client/src/components/NextMeetingInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ function NextMeetingInfo(props) {
<div className="NextMeetingInfo">
<h2 className="">Next Meeting</h2>


<div className="card mb-3" style={{ maxWidth: "550px" }}>

<div className="row g-0">
<div className="col-xl-4">
{props.clubBooks.length ? (
Expand All @@ -19,17 +17,21 @@ function NextMeetingInfo(props) {
className="my-3 ms-2"
id="book-cover-img"
/>
<p className="card-text">
<div className="card-text">
<small className="text-muted">
<h5>{props.clubBooks[props.clubBooks.length - 1].title}</h5>
<h6>
{props.clubBooks[props.clubBooks.length - 1].author}
</h6>
</small>
</p>
</div>
</>
) : (
<img src={props.currentClub.image} className="my-3 ms-2" id="book-cover-img"/>
<img
src={props.currentClub.image}
className="my-3 ms-2"
id="book-cover-img"
/>
)}
</div>
<div className="col-md-8 m-auto">
Expand Down
61 changes: 34 additions & 27 deletions client/src/views/EditProfileView.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,28 @@ function EditProfileView(props) {

{shownClubs &&
shownClubs.map((c) => (
<div className="card text-bg-dark d-inline-flex myClubsCards mb-2 mx-3" key={c.id}>
<div
className="card text-bg-dark d-inline-flex myClubsCards mb-2 mx-3"
key={c.id}
>
<img
src={c.image}
id="header-img"
className="card-img mb-0 myClubsCards"
alt={c.name}
/>
<div className="card-img-overlay">
<p className="EditClubDetails">
<h5 >{c.name}</h5>
<button
type="button"
className="btn btn-outline-dark exit"
onClick={(e) => exitGroup(e)}
name={c.name}
>
Leave club
</button>
<p className="EditClubDetails">
<h5>{c.name}</h5>

<button
type="button"
className="btn btn-outline-dark exit"
onClick={(e) => exitGroup(e)}
name={c.name}
>
Leave club
</button>
</p>
</div>
</div>
Expand All @@ -153,9 +156,10 @@ function EditProfileView(props) {
<br />
<h2 className="title mt-3">Want To Find More?</h2>
<br></br>
<a class="btn btn-outline-dark btn-sm" href="/clubs">Join more clubs
</a>

<a className="btn btn-outline-dark btn-sm" href="/clubs">
Join more clubs
</a>

<br />

<h2 className="title mt-5">Edit Your Bookshelf</h2>
Expand All @@ -177,7 +181,7 @@ function EditProfileView(props) {
postBookForUser={(bookData) => postBookForUser(bookData)}
/>

<h2 className="title mt-5">Search For A Book</h2>
<h2 className="title mt-5">Search For A Book</h2>
<BookSearchProfile user={user} getBooks={(e) => getBooks()} />

{shownBooks &&
Expand All @@ -195,21 +199,24 @@ function EditProfileView(props) {
</div>

<div className="card-body">
<h6>My rating:
<ReactStars
count={5}
size={24}
value={b.rating}
onChange={(r) => ratingChanged(r, b)}
color2={"#ffd700"}
/></h6>
<h6>
My rating:
<ReactStars
count={5}
size={24}
value={b.rating}
onChange={(r) => ratingChanged(r, b)}
color2={"#ffd700"}
/>
</h6>

<h5 className="card-title">{b.title}</h5>

<h6 className="card-text">By {b.author}</h6>

<label><h6 className="mt-2">Read on:</h6>

<label>
<h6 className="mt-2">Read on:</h6>

<input
type="date"
defaultValue={DateTime.fromISO(b.date_read).toFormat(
Expand All @@ -236,7 +243,7 @@ function EditProfileView(props) {

<br />
<a
className="card-title"
className="card-title"
data-bs-toggle="modal"
data-bs-target="#myModal"
onClick={(e) => setBook(b)}
Expand Down
75 changes: 35 additions & 40 deletions client/src/views/ProfileView.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ function ProfileView(props) {

let user = props.user;

console.log("user", user);

function handleClick() {
navigate(`/users/${userId}/edit`);
}
Expand Down Expand Up @@ -53,24 +51,19 @@ function ProfileView(props) {
<div className="JoinedClubs mt-5">
<h2 className="mb-5">Your Book Clubs</h2>

<div className="row px-5">
{user.clubs.map((c) => (
<div className="col-lg-4 overlay" key={c.id}>
<div className="">
<img
src={c.image}
id="club-img"
alt={c.name}
/>
</div>
<div className="cb-text-overlay ">
<Link to={`/clubs/${c.id}`} className="card-title" key={c.id}>
<h4 className="cb-text-bg rounded">{c.name}</h4>
</Link>
<div className="row px-5">
{user.clubs.map((c) => (
<div className="col-lg-4 overlay" key={c.id}>
<div className="">
<img src={c.image} id="club-img" alt={c.name} />
</div>
<div className="cb-text-overlay ">
<Link to={`/clubs/${c.id}`} className="card-title" key={c.id}>
<h4 className="cb-text-bg rounded">{c.name}</h4>
</Link>
</div>
</div>

</div>
))}
))}
</div>
</div>

Expand Down Expand Up @@ -135,15 +128,15 @@ function ProfileView(props) {
/>
</div>

<div className="card-body">

<p>My Rating:</p>
<ReactStars
count={5}
size={24}
value={b.rating}
edit={false}
color2={'#ffd700'} />
<div className="card-body">
<p>My Rating:</p>
<ReactStars
count={5}
size={24}
value={b.rating}
edit={false}
color2={"#ffd700"}
/>

<div className="card-title">
<Link to={`/books/all/${b.book_id}`} key={b.book_id}>
Expand Down Expand Up @@ -176,22 +169,24 @@ function ProfileView(props) {

<br />

<a data-bs-toggle="modal" data-bs-target="#myModal" onClick={e => setBook(b)}> View My Review</a>
</div>

<ViewReviewModal id="myModal" book={book}/>

<a
data-bs-toggle="modal"
data-bs-target="#myModal"
onClick={(e) => setBook(b)}
>
{" "}
View My Review
</a>
</div>


</div>
</div>
</div>
))}
<ViewReviewModal id="myModal" book={book} />
</div>
</div>
</div>

))}
</div>
</div>

</div>
);
}

Expand Down
Loading