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

Feat: 상품 썸네일 및 판매시작 api 연동 #124

Merged
merged 14 commits into from
Dec 5, 2021
Merged
9 changes: 3 additions & 6 deletions src/pages/CreateProduct/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,16 @@ const Footer = (): React.ReactElement => {

mutate(postProductData);
pathname: '/product',
jiyaaany marked this conversation as resolved.
Show resolved Hide resolved
onError: () => setOpenErrorSnackbar(true),
YuuRiLee marked this conversation as resolved.
Show resolved Hide resolved
});

const handleSnackbarClose = () => {
setOpenErrorSnackbar(false);
};

const saveProduct = (): void => {
try {
mutate({ id: 1 });
history.push(MY_INFORMATION_ROUTER_ROOT);
} catch (e) {
setOpenErrorSnackbar(true);
}
mutate({ id: 1 });
history.push(MY_INFORMATION_ROUTER_ROOT);
};

const requestSaveProduct = async (): Promise<void> => {
Expand Down