UNPKG

@fakel/rest-admin

Version:

An application that makes it easier to work with your API

15 lines (14 loc) 553 B
import React from 'react'; import Button from 'antd/lib/button'; import { observer } from 'mobx-react'; import { useLogin } from '../../hooks/useLogin'; import { withI18 } from '../../hoc/withI18'; var LogoutButton = observer(function (_a) { var type = _a.type, text = _a.text, style = _a.style; var logout = useLogin().logout; var onClick = function () { logout(); }; return (React.createElement(Button, { style: style, type: type || 'link', onClick: onClick }, text || 'Logout')); }); export default withI18(LogoutButton);