-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
address saving functionality #100
base: master
Are you sure you want to change the base?
Conversation
}) | ||
); | ||
|
||
// userRouter.get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to remove commented code (dead code).
@@ -85,6 +85,7 @@ orderRouter.post( | |||
'/', | |||
isAuth, | |||
expressAsyncHandler(async (req, res) => { | |||
console.log("Order req ", req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove logs.
try { | ||
const { data } = await Axios.get('/api/address', { | ||
}); | ||
console.log(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove logs.
@@ -52,6 +52,7 @@ export const signin = (email, password) => async (dispatch) => { | |||
dispatch({ type: USER_SIGNIN_REQUEST, payload: { email, password } }); | |||
try { | |||
const { data } = await Axios.post('/api/users/signin', { email, password }); | |||
console.log("TOKEN ", data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove logs.
} | ||
}; | ||
|
||
// export const productCreateReducer = (state = {}, action) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove commented code before pushing the code.
const addressesList = useSelector((state) => state.addressesList); | ||
const { loading, error, addressList } = addressesList; | ||
|
||
console.log(addressList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove logs.
@@ -12,6 +12,7 @@ import { Link } from 'react-router-dom'; | |||
export default function HomeScreen() { | |||
const dispatch = useDispatch(); | |||
const productList = useSelector((state) => state.productList); | |||
console.log(productList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove logs.
I have added the Address functionality that was missing in the code since an e-commerce website should have the feature of adding and selecting address. As of now, the functionality can add address to the database through Postman but can be fetched on the web app as well. I have created the routes for these functionalities and all changes have been mentioned in the ChangeLog.txt file.