feat: const for routes and init profile page
This commit is contained in:
@@ -5,6 +5,7 @@ import {ExclamationCircleOutlined} from "@ant-design/icons";
|
||||
import {useHistory} from "react-router-dom";
|
||||
import {capitalize} from "lodash";
|
||||
import {useStore} from "../utils/useStore";
|
||||
import {LINKS} from "../routes/app";
|
||||
|
||||
export const ProductComponent = observer((props) => {
|
||||
const store = useStore();
|
||||
@@ -113,7 +114,7 @@ export const ProductComponent = observer((props) => {
|
||||
console.log(id);
|
||||
await store.product.delete(id);
|
||||
message.success("Data Berhasil Dihapus");
|
||||
history.push("/app/product");
|
||||
history.push(LINKS.PRODUCT);
|
||||
} catch (err) {
|
||||
console.log("error", err);
|
||||
message.error("Gagal menghapus");
|
||||
|
||||
Reference in New Issue
Block a user