|
@@ -4,6 +4,7 @@ import PropTypes from "prop-types";
|
|
|
import Link from "next/link";
|
|
import Link from "next/link";
|
|
|
import { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem, ListGroup, ListGroupItem } from "reactstrap";
|
|
import { UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem, ListGroup, ListGroupItem } from "reactstrap";
|
|
|
import { createLog } from "@/actions/log";
|
|
import { createLog } from "@/actions/log";
|
|
|
|
|
+import { logout } from "@/actions/auth";
|
|
|
import { connect } from "react-redux";
|
|
import { connect } from "react-redux";
|
|
|
import { bindActionCreators } from "redux";
|
|
import { bindActionCreators } from "redux";
|
|
|
import * as actions from "../../store/actions/actions";
|
|
import * as actions from "../../store/actions/actions";
|
|
@@ -56,7 +57,7 @@ class Header extends Component {
|
|
|
|
|
|
|
|
handleLogout = async (e) => {
|
|
handleLogout = async (e) => {
|
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
|
- // await logout();
|
|
|
|
|
|
|
+ await logout();
|
|
|
await createLog(this.props.token, { aktivitas: "Berhasil Logout" });
|
|
await createLog(this.props.token, { aktivitas: "Berhasil Logout" });
|
|
|
this.props.tokenNull();
|
|
this.props.tokenNull();
|
|
|
this.props.userNull();
|
|
this.props.userNull();
|