From 3a40d639358724355c342441520e751bf1938d4d Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Mon, 8 Jun 2020 18:11:35 +0800
Subject: feat(front): Fix #76 .

---
 Timeline/ClientApp/src/common/CollapseButton.tsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'Timeline/ClientApp/src/common/CollapseButton.tsx')

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
-- 
cgit v1.2.3

