From 07ca1676f4f4e99a344a22adfa5a435ee2a1c3cb Mon Sep 17 00:00:00 2001 From: Evgenia Karunus Date: Tue, 15 Oct 2024 18:38:04 +0500 Subject: [PATCH] [EASTER EGG] `` - hide hypothesis on ALT+click --- .../Hypotheses/components/HypothesisNode.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/components/ProofTree/components/BoxEl/components/Hypotheses/components/HypothesisNode.tsx b/app/src/components/ProofTree/components/BoxEl/components/Hypotheses/components/HypothesisNode.tsx index 9db9024..637784d 100644 --- a/app/src/components/ProofTree/components/BoxEl/components/Hypotheses/components/HypothesisNode.tsx +++ b/app/src/components/ProofTree/components/BoxEl/components/Hypotheses/components/HypothesisNode.tsx @@ -18,11 +18,23 @@ const HypothesisNode = ({ withId = true, ...props }: HypothesisProps) => { const isSearched = searchedHypIds.find((searchedId) => props.hypNode.id === searchedId) + const [isHidden, setIsHidden] = React.useState(false); + + const handleClick = (e: React.MouseEvent) => { + if (e.altKey) { + e.preventDefault(); + setIsHidden(true); + } + }; + + if (isHidden) return null; + return(
{props.hypNode} {name && {props.hypNode.name}}