Skip to content

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).

'/',
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.

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.

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.

2 participants