Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apoorva3010
Copy link

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.

})
);

// userRouter.get(

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)

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)

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)

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) => {

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)

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants