Skip to content

address saving functionality#100

Open
apoorva3010 wants to merge 1 commit into
basir:masterfrom
apoorva3010:master
Open

address saving functionality#100
apoorva3010 wants to merge 1 commit into
basir:masterfrom
apoorva3010:master

Conversation

@apoorva3010
Copy link
Copy Markdown

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(
Copy link
Copy Markdown

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)
Copy link
Copy Markdown

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)
Copy link
Copy Markdown

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)
Copy link
Copy Markdown

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) => {
Copy link
Copy Markdown

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)
Copy link
Copy Markdown

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)
Copy link
Copy Markdown

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