Implementation of Project Week 3
5 unresolved threads
5 unresolved threads
Create the login and sign-in page. Connect the front end to the database. Create the user profile and library page. Connect the library page to the albums from the dashboard.
Merge request reports
Activity
44 href={album.external_urls.spotify} 45 rel="noopener noreferrer" 46 className="card-image-link" 47 > 48 {!_.isEmpty(album.images) ? ( 49 <Card.Img 50 variant="top" 51 src={album.images[0].url} 52 alt="" /> 53 ) : ( 54 <img src={music} alt="" /> 55 )} 56 </a> 57 <Card.Header>{album.name}</Card.Header> 58 <Card.Body> 59 <Card.Title>{album.artists.map((artist) => artist.name).join(', ')}</Card.Title> 13 const { email, password } = formData; 14 15 const onChange = e => 16 setFormData({ ...formData, [e.target.name]: e.target.value }); 17 18 const onSubmit = e => { 19 e.preventDefault(); 20 login(email, password); 21 }; 22 23 if (isAuthenticated) { 24 alert("log in success") 25 return <Redirect to="/dashboard" />; 26 } 27 28 // const handleSumbit = (evt) => { You might want to remove unused commented code in your submission to improve clarity, these code might create confusion for other people when trying to maintain or extend you code.
Edited by yuefeng3
24 boxShadow: '0px 5px 8px -3px rgba(0,0,0,0.14)', 25 "&:focus": { 26 borderRadius: 12, 27 background: 'white', 28 borderColor: deepPurple[500] 29 }, 30 }, 31 paper: { 32 padding: theme.spacing(2), 33 textAlign: 'center', 34 color: theme.palette.text.secondary, 35 }, 36 37 })); 38 39 function UserLibrary({ auth: { user }, loadUser }) { 65 alert("name change success") 66 } 67 if (values.password) { 68 getData('/user/me/password', 'PUT', myHeaders, JSON.stringify({ 'password': values.password })) 69 alert("password change success") 70 } 71 72 } 73 74 useEffect(() => { 75 getData('/user/me', 'GET', myHeaders, null) 76 }, []); 77 78 79 return ( 80 - music-search-library-app/src/utils/api.js 0 → 100644
1 import axios from 'axios'; 2 import store from '../store/store'; 3 import { LOGOUT } from '../actions/types'; 4 5 const api = axios.create({ 6 baseURL: '/', 7 headers: { 8 'Content-Type': 'application/json' 9 } 10 }); 11 /** 12 intercept any error responses from the api Peer Review Report
1-This question references the Code Review Checklist available at course website. Select one item from Item 4 (Non Functional requirements) in the checklist, and answer the following questions:
- Maintainability
- Did well in some part of the code, and there are space for improvement.
- Could include some comments in files like UserLibrary.js to improve readability. There are also many commented code which might create confusion for others.
2-Please select one item from the Item 5 (OOAD Principle), and answer the following questions:
- Single Responsibility Principle
- Yes
- Code was well separated into different files according to their responsibility. Good job!
3-If applicable, does the author address all the comments you made last week?
- Author did put more considerations into error status codes, but did not see any changes in unit tests.
mentioned in commit a4b0841b
Please register or sign in to reply