Mao 4 лет назад
Родитель
Сommit
0ad61f0451

+ 3 - 5
packages/app/src/components/SearchPage/SearchResultSubNavButton.tsx

@@ -39,18 +39,16 @@ const PageReactionButtons : React.FC<PageReactionButtonsProps> = (props: PageRea
     f();
   }, []);
 
-  const onChnageInvoked = () => {
+  const onChangeInvoked = () => {
     setSumOfLikers(sumOflikers => (isLiked ? sumOflikers - 1 : sumOflikers + 1));
-    setLikers(likerIds => (isLiked
-      ? likerIds.filter(id => id !== appContainer.currentUserId)
-      : [...likerIds, appContainer.currentUserId]));
+    setLikers(likerIds => (isLiked ? likerIds.filter(id => id !== appContainer.currentUserId) : [...likerIds, appContainer.currentUserId]));
     setIsLiked(isLiked => !isLiked);
   };
   return (
     <>
       <span>
         <LikeButtonsTypeAny
-          onChangeInvoked={onChnageInvoked}
+          onChangeInvoked={onChangeInvoked}
           pageId={pageId}
           likers={likers}
           sumOfLikers={sumOflikers}