Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
guzmanalejandro committed Dec 14, 2023
1 parent 437899a commit b1d36db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/components/UserFeed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ function UserFeed() {
setPage(0);
setFeedType(tab);
setFinished(false);
setRecipes([]);
if(isLogged()){
setRecipes([]);
}
localStorage.setItem('feedType', tab);
if (!isLogged() && tab === "following") {
setShowLoginRedirectModal(true);
Expand Down Expand Up @@ -232,7 +234,7 @@ function UserFeed() {
<Modal.Title>Required log in</Modal.Title>
</Modal.Header>
<Modal.Body className="bg-lightest">You need to log in to view the recipes of the people you follow.</Modal.Body>
<Modal.Footer>
<Modal.Footer style={{ backgroundColor: "#ffe7dfe0"}}>
<Button variant="secondary" onClick={() => setShowLoginRedirectModal(false)}>
Cancel
</Button>
Expand Down
12 changes: 6 additions & 6 deletions src/components/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ const UserProfile = () => {
</Col>
</Row>
</Modal.Body>
<Modal.Footer className="justify-content-center">
<Modal.Footer style={{ backgroundColor: "#ffe7dfe0"}} className="justify-content-center">
<Button variant="danger" onClick={handleRecipeRemove}>
Remove
</Button>
Expand All @@ -784,7 +784,7 @@ const UserProfile = () => {
<Modal.Title>Profile Update</Modal.Title>
</Modal.Header>
<Modal.Body className="bg-lightest">{confirmationMessage}</Modal.Body>
<Modal.Footer>
<Modal.Footer style={{ backgroundColor: "#ffe7dfe0"}}>
<Button variant="secondary" onClick={handleConfirmationClose}>
Close
</Button>
Expand Down Expand Up @@ -833,7 +833,7 @@ const UserProfile = () => {
</Form.Group>
</Form>
</Modal.Body>
<Modal.Footer>
<Modal.Footer >
<Button variant="secondary" onClick={handleCancelEdit}>
Cancel
</Button>
Expand All @@ -852,7 +852,7 @@ const UserProfile = () => {
<Modal.Title>{operationSuccess ? 'Success' : 'Error'}</Modal.Title>
</Modal.Header>
<Modal.Body className="bg-lightest">{confirmationMessage}</Modal.Body>
<Modal.Footer>
<Modal.Footer style={{ backgroundColor: "#ffe7dfe0"}}>
<Button variant="secondary" onClick={handleConfirmationClose}>
Close
</Button>
Expand Down Expand Up @@ -989,7 +989,7 @@ const UserProfile = () => {
<Modal.Title>Unfollow User</Modal.Title>
</Modal.Header>
<Modal.Body className="bg-lightest">Do you want to unfollow this user?</Modal.Body>
<Modal.Footer className="bg-lightest">
<Modal.Footer style={{ backgroundColor: "#ffe7dfe0"}}>
<Button variant="secondary" onClick={() => setShowUnfollowModal(false)}>
Cancel
</Button>
Expand All @@ -1004,7 +1004,7 @@ const UserProfile = () => {
<Modal.Title>Required log in</Modal.Title>
</Modal.Header>
<Modal.Body>You need to log in to follow this user.</Modal.Body>
<Modal.Footer>
<Modal.Footer style={{ backgroundColor: "#ffe7dfe0"}}>
<Button variant="secondary" onClick={() => setShowLoginRedirectModal(false)}>
Cancel
</Button>
Expand Down

0 comments on commit b1d36db

Please sign in to comment.