Skip to content

Commit 41d15f0

Browse files
committed
Edit clickable for card
1 parent a604346 commit 41d15f0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/Auth/Profile.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import {
66
EllipsisOutlined,
77
SettingOutlined,
88
} from '@ant-design/icons';
9+
import { Link, useHistory } from 'react-router-dom';
10+
import { PATH } from 'src/constants/paths';
911
const { Meta } = Card;
1012

1113
const mapStateToProps = (state: AppState) => ({
@@ -18,11 +20,16 @@ const connector = connect(mapStateToProps, mapDispatchToProps);
1820
interface Props extends ConnectedProps<typeof connector> {}
1921
const _Profile = (props: Props) => {
2022
const { user } = props;
23+
const history = useHistory();
24+
const onSetting = () => {
25+
history.push(PATH.HOME);
26+
};
2127
return (
2228
<div className="mt-1">
2329
<Row>
2430
<Col span={8} offset={10}>
2531
<Card
32+
hoverable
2633
style={{ width: 350 }}
2734
cover={
2835
<img
@@ -31,7 +38,7 @@ const _Profile = (props: Props) => {
3138
/>
3239
}
3340
actions={[
34-
<SettingOutlined key="setting" />,
41+
<SettingOutlined key="setting" onClick={() => onSetting()} />,
3542
<EditOutlined key="edit" />,
3643
<EllipsisOutlined key="ellipsis" />,
3744
]}

0 commit comments

Comments
 (0)