aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/common
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-08 18:11:35 +0800
committercrupest <crupest@outlook.com>2020-06-08 18:11:35 +0800
commitb4aae221d279738bb9001df8386b46fd640e73ff (patch)
tree4448a322575fb9396408863813066b862218b55f /Timeline/ClientApp/src/common
parentfc1f48b543e07af402cf01497f4436135ea0bdf4 (diff)
downloadtimeline-b4aae221d279738bb9001df8386b46fd640e73ff.tar.gz
timeline-b4aae221d279738bb9001df8386b46fd640e73ff.tar.bz2
timeline-b4aae221d279738bb9001df8386b46fd640e73ff.zip
feat(front): Fix #76 .
Diffstat (limited to 'Timeline/ClientApp/src/common')
-rw-r--r--Timeline/ClientApp/src/common/CollapseButton.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/Timeline/ClientApp/src/common/CollapseButton.tsx b/Timeline/ClientApp/src/common/CollapseButton.tsx
index 03f42e73..28385003 100644
--- a/Timeline/ClientApp/src/common/CollapseButton.tsx
+++ b/Timeline/ClientApp/src/common/CollapseButton.tsx
@@ -2,16 +2,12 @@ import React from 'react';
export interface CollapseButtonProps {
collapse: boolean;
- toggle: (visibility: boolean) => void;
+ onClick: () => void;
className?: string;
}
const CollapseButton: React.FC<CollapseButtonProps> = (props) => {
- const { toggle, collapse, className } = props;
-
- const onClick = React.useCallback(() => {
- toggle(!collapse);
- }, [toggle, collapse]);
+ const { onClick, collapse, className } = props;
return (
<svg